identity-obj-proxy
an identity object using ES6 proxies
Last updated 3 years ago by keyanzhang .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (3 years ago)

3 Versions

  • 3.0.0                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 762
This Week 762
This Month 48,115
Last Day 650
Last Week 13,710
Last Month 59,181
Dependencies (1)
Dev Dependencies (9)
Dependents (1888)

Copyright 2014 - 2016 © taobao.org |