identity-obj-proxy (3.0.0)
Published 2026-02-24 13:58:02 +00:00 by atheaadmin
Installation
registry=npm install identity-obj-proxy@3.0.0"identity-obj-proxy": "3.0.0"About this package
identity-obj-proxy

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'
Dependencies
Dependencies
| ID | Version |
|---|---|
| harmony-reflect | ^1.4.6 |
Development Dependencies
| ID | Version |
|---|---|
| babel-core | ^6.11.4 |
| babel-jest | ^14.1.0 |
| babel-preset-es2015 | ^6.9.0 |
| babel-preset-stage-0 | ^6.5.0 |
| coveralls | ^2.11.12 |
| eslint | ^3.2.2 |
| eslint-config-airbnb-base | ^5.0.1 |
| eslint-plugin-import | ^1.12.0 |
| jest-cli | ^14.1.0 |
Keywords
proxy
proxies
identity
jest
mock