has
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "has", | ||
"description": "Object.prototype.hasOwnProperty.call shortcut", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"homepage": "https://github.com/tarruda/has", | ||
@@ -10,2 +10,9 @@ "author": { | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "Jordan Harband", | ||
"email": "ljharb@gmail.com", | ||
"url": "http://ljharb.codes" | ||
} | ||
], | ||
"repository": { | ||
@@ -18,2 +25,3 @@ "type": "git", | ||
}, | ||
"license": "MIT", | ||
"licenses": [ | ||
@@ -25,16 +33,19 @@ { | ||
], | ||
"main": "./src/index", | ||
"main": "./src", | ||
"dependencies": { | ||
"function-bind": "^1.0.2" | ||
"function-bind": "^1.1.1" | ||
}, | ||
"devDependencies": { | ||
"chai": "~1.7.2", | ||
"mocha": "^1.21.4" | ||
"@ljharb/eslint-config": "^12.2.1", | ||
"eslint": "^4.19.1", | ||
"tape": "^4.9.0" | ||
}, | ||
"engines": { | ||
"node": ">= 0.8.0" | ||
"node": ">= 0.4.0" | ||
}, | ||
"scripts": { | ||
"test": "node_modules/mocha/bin/mocha" | ||
"lint": "eslint .", | ||
"pretest": "npm run lint", | ||
"test": "tape test" | ||
} | ||
} |
@@ -0,3 +1,5 @@ | ||
'use strict'; | ||
var bind = require('function-bind'); | ||
module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); |
@@ -1,10 +0,10 @@ | ||
global.expect = require('chai').expect; | ||
var has = require('../src'); | ||
'use strict'; | ||
var test = require('tape'); | ||
var has = require('../'); | ||
describe('has', function() { | ||
it('works!', function() { | ||
expect(has({}, 'hasOwnProperty')).to.be.false; | ||
expect(has(Object.prototype, 'hasOwnProperty')).to.be.true; | ||
}); | ||
test('has', function (t) { | ||
t.equal(has({}, 'hasOwnProperty'), false, 'object literal does not have own property "hasOwnProperty"'); | ||
t.equal(has(Object.prototype, 'hasOwnProperty'), true, 'Object.prototype has own property "hasOwnProperty"'); | ||
t.end(); | ||
}); |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2854
11
3
6
Updatedfunction-bind@^1.1.1