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                                ...           3 years ago
Maintainers (1)
Downloads
Today 445
This Week 11,094
This Month 21,263
Last Day 768
Last Week 9,033
Last Month 44,648
Dependencies (1)
Dev Dependencies (9)
Dependents (1575)

Copyright 2014 - 2016 © taobao.org |