Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

identity-obj-proxy

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

identity-obj-proxy - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

.babelrc

16

package.json
{
"name": "identity-obj-proxy",
"version": "2.0.0",
"version": "3.0.0",
"description": "an identity object using ES6 proxies",

@@ -37,7 +37,11 @@ "main": "src/index.js",

"devDependencies": {
"coveralls": "^2.11.9",
"eslint": "^2.11.0",
"eslint-config-airbnb-base": "^3.0.1",
"eslint-plugin-import": "^1.8.1",
"jest-cli": "^12.1.1"
"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"
},

@@ -44,0 +48,0 @@ "jest": {

@@ -1,6 +0,10 @@

# identity-obj-proxy [![Build Status](https://img.shields.io/travis/keyanzhang/identity-obj-proxy.svg?style=flat)](https://travis-ci.org/keyanzhang/identity-obj-proxy) [![npm version](https://img.shields.io/npm/v/identity-obj-proxy.svg?style=flat)](https://www.npmjs.com/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](https://github.com/css-modules/css-modules); then all your `className` lookup on the imported `styles` object will be returned as-is.
# identity-obj-proxy [![Build Status](https://img.shields.io/travis/keyanzhang/identity-obj-proxy.svg?style=flat-square)](https://travis-ci.org/keyanzhang/identity-obj-proxy) [![npm version](https://img.shields.io/npm/v/identity-obj-proxy.svg?style=flat-square)](https://www.npmjs.com/package/identity-obj-proxy) [![test coverage](https://img.shields.io/coveralls/keyanzhang/identity-obj-proxy/master.svg?style=flat-square)](https://coveralls.io/github/keyanzhang/identity-obj-proxy?branch=master)
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](https://github.com/css-modules/css-modules); then all your `className` lookups on the imported `styles` object will be returned as-is.
```
npm install identity-obj-proxy
```
## Requirement
`node --harmony_proxies` flag (>= v0.11)
No flag is required for Node.js `v6.*`; use `node --harmony_proxies` flag for `v5.*` and `v4.*`.

@@ -7,0 +11,0 @@ ## Example

@@ -1,14 +0,13 @@

/* eslint-disable space-before-function-paren, func-names */
var idObj = require('..');
const idObj = require('..');
describe('idObj', function() {
it('should return the key as a string', function() {
describe('idObj', () => {
it('should return the key as a string', () => {
expect(idObj.foo).toBe('foo');
});
it('should support dot notation', function() {
it('should support dot notation', () => {
expect(idObj.bar).toBe('bar');
});
it('should support bracket notation', function() {
it('should support bracket notation', () => {
expect(idObj[1]).toBe('1');
});
});

@@ -0,1 +1,2 @@

/* eslint-disable no-var, comma-dangle */
var Reflect; // eslint-disable-line no-unused-vars

@@ -18,2 +19,5 @@ var idObj;

get: function getter(target, key) {
if (key === '__esModule') {
return false;
}
return key;

@@ -20,0 +24,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc