This repository has been archived on 2026-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
todo/client/node_modules/identity-obj-proxy
2025-06-13 14:04:40 +08:00
..
src Initial commit 2025-06-13 14:04:40 +08:00
.babelrc Initial commit 2025-06-13 14:04:40 +08:00
.eslintrc Initial commit 2025-06-13 14:04:40 +08:00
.npmignore Initial commit 2025-06-13 14:04:40 +08:00
.travis.yml Initial commit 2025-06-13 14:04:40 +08:00
LICENSE Initial commit 2025-06-13 14:04:40 +08:00
package.json Initial commit 2025-06-13 14:04:40 +08:00
README.md Initial commit 2025-06-13 14:04:40 +08:00

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'