An extension to existing JavaScript, influenced by other great languages such as Rust, Dart, Java, Golang, etc.
A collections of extensions for JavaScript that borrow some of the useful features from other programming languages.
// It is recommended to only import those extensions you need instead of everything.
import { extend } from "https://cdn.jsdelivr.net/gh/motss/[email protected]/jsmodern/extend.ts";
import { sum } from "https://cdn.jsdelivr.net/gh/motss/[email protected]/jsmodern/array.ts";
extend({ array: [sum] });
const total = [1, 2, 3].sum();
console.log(total === 6); // true
- Array extensions
- Boolean extensions
- Date extensions
- Error extensions
- Function extensions
- Iterator extensions
- Map extensions
- Number extensions
- Object extensions
- Promise extensions
- [RegExp extensions]
- Set extensions
- String extensions
- Symbol extensions
- WeakMap extensions
- WeakSet extensions
MIT License © Rong Sen Ng