identity-obj-proxy
an identity object using ES6 proxies
Last updated 8 years ago by keyanzhang .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install identity-obj-proxy 
SYNC missed versions from official npm registry.

identity-obj-proxy Build Status npm version test coverage

An identity object using ES6 proxies. Useful for testing trivial webpack imports. For instance, you can tell Jest to mock this object as imported CSS modules; then all your className lookups on the imported styles object will be returned as-is.

npm install identity-obj-proxy

Requirement

No flag is required for Node.js v6.*; use node --harmony_proxies flag for v5.* and v4.*.

Example

import idObj from 'identity-obj-proxy';
console.log(idObj.foo); // 'foo'
console.log(idObj.bar); // 'bar'
console.log(idObj[1]); // '1'

Current Tags

  • 3.0.0                                ...           latest (8 years ago)

3 Versions

  • 3.0.0                                ...           8 years ago
  • 2.0.0                                ...           8 years ago
  • 1.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Total 9
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (9)

© 2010 - cnpmjs.org x YWFE | Home | YWFE