JS reflection APIs
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
History.md
Readme.md
core.js
package.json

Readme.md

reflection

I don't know about you, but I'm tired of writing:

Array.prototype.slice.call(arguments, 1)

// or

Object.prototype.hasOwnProperty(object, 'foo')

This simple library allows you to do the same in less chatty way (Specially useful when working with promises).

var reflection = require('reflection/core')

reflection.slice(arguments, 2)
reflection.owns(object, 'foo')
reflection.split('foo bar baz', ' ')

Install

npm install reflection