Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gamtiq/es5-micro-shim

Several shims for ECMAScript 5 functions
https://github.com/gamtiq/es5-micro-shim

Last synced: about 8 hours ago
JSON representation

Several shims for ECMAScript 5 functions

Awesome Lists containing this project

README

        

# es5-micro-shim

Several shims for ECMAScript 5 functions:

* `Array.isArray`
* `Array.prototype.indexOf`
* `Function.prototype.bind`
* `Object.create`
* `Object.keys`

## Installation

Install [Component](https://github.com/componentjs/component):

npm install -g component

Then:

component install gamtiq/es5-micro-shim

## Usage

```js
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