npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jsimplify

v0.10.1

Published

Additionnal functions and Js improvement

Downloads

6

Readme

JSimplify

JSimplify logo

JSimplify : additionnal functions and javascript improvements.

Main Objectives

The main objective for this project is to provide additionnal functions to javascript and to rewrite native function in order to improve them.

How to use

Installation

In a terminal, run the following command

npm install jsimplify

Tests

In a terminal, run the following command

npm run jsimplify_tests

Key Features

Here is a list of all the functions present in this project. The list is divided into two parts, the first one concerns the new functions, and the second one, the JavaScript functions that we have rewritten.

New functions

| Function | Description | Usage | |:---------|:------------|:------| | isSet(variable) | Determine if the given variable is set.not null and not undefined. | isSet("toto") | | areSet(strict, ...variables) | Determine if the given variables are set.if strict set to true, all variables must be not null and not undefined.if stric set to false, only one must be not null and not undefined. | areSet(true, "toto", 2)areSet(false, ["toto", 2]) |

Rewriten functions

| Function | Description | Usage | |:---------|:------------|:------| | Object.prototype.isEmpty() | Determine if the object is empty : {}. | ({}).isEmpty() | | Array.prototype.isEmpty() | Determine if the array is empty []. | [].isEmpty() | | String.prototype.isEmpty() | Determine if the string is empty "". | "".isEmpty() | | Object.prototype.asString() | Convert the object into a string. | ({}).asString() | | Array.prototype.asString() | Convert the array into a string. | [].asString() | | String.prototype.asString() | Convert the string into a string. | "".asString() | | Number.prototype.asString() | Convert the number into a string. | (2).asString() | | Boolean.prototype.asString() | Convert the boolean into a string. | (true).asString() | | Function.prototype.asString() | Convert the function into a string. | (() => {}).asString() | | Math.average(...numbers) | Calculate the average value of a list of numbers. | Math.average(1, 2, 3)Math.average(1, [2, 3, ["4", "5"]]) | | Math.sum(...numbers) | Calculate the sum value of a list of numbers. | Math.sum(1, 2, 3)Math.sum(1, [2, 3, ["4", "5"]]) | | Math.roundPrecisely(number, precision) | Round a number to the given precision. | Math.roundPrecisely(378.245, 2)Math.roundPrecisely(378.245, -1) |

Issues & Pull requests

In order to participate in this project, you must create an issue following the various available templates (bug, improvement, new features, issue).

Once your issue is created, a team member will come to validate or reject the issue.

When the issue is validated, you can create your pull request (PR) and link it to its corresponding issue.

Here are some important rules to follow for issues:

  • You must provide a minimum amount of information to make the context understandable for everyone.

  • You must adhere to the code of conduct during any interaction with the project's community.

  • If you wish to participate in the project, please refer to INTERNAL.md to understand the rules and standards established for the project.

Know issues

  • The autocompletion for rewritten object function doesn't work, the function will not appeaer in the selection menu. Howerver, once the function is written, the documentation window will appear correctly.