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 1,586
This Week 4,156
This Month 33,761
Last Day 2,570
Last Week 13,466
Last Month 57,258
Dependencies (1)
Dev Dependencies (9)
Dependents (2077)

Copyright 2014 - 2017 © taobao.org |