Skip to content

gamtiq/es5-micro-shim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

es5-micro-shim

Several shims for ECMAScript 5 functions:

  • Array.isArray
  • Array.prototype.indexOf
  • Function.prototype.bind
  • Object.create
  • Object.keys

Installation

Install Component:

npm install -g component

Then:

component install gamtiq/es5-micro-shim

Usage

var shim = require("es5-micro-shim");
...
var test1 = Array.isArray(obj);
var test2 = shim.isArray(obj);

var child1 = Object.create(obj);
var child2 = shim.create(obj);

var keys1 = Object.keys(obj);
var keys2 = shim.keys(obj);

var boundFunc = someFunction.bind(obj);

var nIndex = someArray.indexOf(someValue1, nStartIndex);

Licence

MIT

About

Several shims for ECMAScript 5 functions

Resources

Stars

Watchers

Forks

Packages

No packages published