Socket
Socket
Sign inDemoInstall

has

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

.eslintrc

25

package.json
{
"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();
});
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc