0.10.1 • Published 3 months ago

jsimplify v0.10.1

Weekly downloads
-
License
GNU GPL 3.0
Repository
github
Last release
3 months ago

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

FunctionDescriptionUsage
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

FunctionDescriptionUsage
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.
0.9.6

3 months ago

0.9.5

3 months ago

0.10.1

3 months ago

0.10.0

3 months ago

0.9.4

3 months ago

0.9.3

3 months ago

0.9.2

3 months ago

0.9.1

3 months ago

0.8.0

3 months ago

0.6.2

3 months ago

0.5.0

3 months ago

0.7.0

3 months ago

0.6.1

3 months ago

0.6.0

3 months ago

0.4.1

4 months ago

0.4.2

4 months ago

0.3.0

6 months ago

0.3.1

6 months ago

0.2.3

7 months ago

0.2.2

7 months ago

0.2.0

7 months ago

0.1.0

7 months ago

0.0.1

7 months ago