js-prototypes (Native Javascript Prototypes Extender Helpers)
Read documentation and full api guide https://dimaslanjaka.github.io/js-prototypes/
Incompatible With These Dependencies
instalation
npm
npm i git+https://github.com/dimaslanjaka/js-prototypes.git
npm without git
npm i https://github.com/dimaslanjaka/js-prototypes/tarball/master
yarn
git config --global url."https://".insteadOf ssh://
yarn add git+https://github.com/dimaslanjaka/js-prototypes.git
yarn without git
yarn add https://github.com/dimaslanjaka/js-prototypes/tarball/master
usage
read more: http://dimaslanjaka.github.io/js-prototypes
custom source: src
Standard
insert below codes above all import
import 'js-prototypes'; // typescript
require('js-prototypes'); // javascript
all global functions and prototypes modified and included successful.
typescript
// global automated shim to all prototypes (recommended)
import "js-prototypes"
// import custom prototypes
import "js-prototypes/src/String";
import "js-prototypes/src/Array";
import "js-prototypes/src/Object";
javascript
// global shim
require("js-prototypes");
// import custom prototypes
require("js-prototypes/dist/String");
require("js-prototypes/dist/Array");
// es6 supported
import "js-prototypes/dist/Object";
html browser usage
<script src="https://raw.githack.com/dimaslanjaka/js-prototypes/master/dist/release/bundle.js"></script>
<script>
console.log(typeof [].addAll); // function
</script>