Skip to content
An extension to existing JavaScript, influenced by other great languages such as Rust, Dart, Java, Golang, etc.
TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
demo
src
.editorconfig
.gitattributes
.gitignore
.jestrc.json
.npmrc
CODE_OF_CONDUCT.md
LICENSE
README.md
package-lock.json
package.json
tsconfig.json
tsconfig.prod.json
tsconfig.test.es2017.json
tsconfig.test.json
tslint.json
tslint.prod.json

README.md

jsmodern

An extension to existing JavaScript, influenced by other great languages such as Rust, Dart, Java, Golang, etc.


Buy Me A Coffee tippin.me Follow me

Version Node version MIT License

Downloads Total downloads Packagephobia Bundlephobia

CircleCI Dependency Status codecov Coverage Status

codebeat badge Codacy Badge Code of Conduct

This is, by no means, to replace JavaScript or anything like that. This is just a rather straightforward module that extends native JavaScript with useful methods that are available in some other great languages such as Rust, Dart, Java, Golang, just to name a few. This is the state what I wanted JavaScript to be in next few years. If you're with me, let's hit me up for collaboration! 💯

Table of contents

Pre-requisites

  • Node.js >= 8.16.0
  • NPM >= 6.4.1 (NPM comes with Node.js so there is no need to install separately.)

Installation

# Install via NPM
$ npm install --save jsmodern

Usage

// It is recommended to only import those extensions you need instead of everything.
import { extend } from 'jsmodern';
import { sum } from 'jsmodern/dist/array/index.js';

extend({ array: [sum] });

const total = [1, 2, 3].sum();

console.log(total === 6); // true

Available extensions

License

MIT License © Rong Sen Ng (motss)

You can’t perform that action at this time.