has-properties
Advanced tools
+3
-5
| 'use strict'; | ||
| var isObject = require('1-liners/isObject'); | ||
| var diff = function(a, b) { | ||
@@ -9,8 +11,4 @@ return a.filter(function(i) { | ||
| var isObject = function(obj) { | ||
| return (typeof obj === 'object' && !Array.isArray(obj)); | ||
| }; | ||
| module.exports = function(obj, keys) { | ||
| if (obj === null || !isObject(obj)) { | ||
| if (!isObject(obj) || Array.isArray(obj)) { | ||
| throw new Error('First argument must be an object.'); | ||
@@ -17,0 +15,0 @@ } |
+4
-1
| { | ||
| "name": "has-properties", | ||
| "version": "1.1.0", | ||
| "version": "1.1.1", | ||
| "description": "Checks if the given object has the required/mandatory properties.", | ||
@@ -35,3 +35,6 @@ "license": "MIT", | ||
| "mocha": "*" | ||
| }, | ||
| "dependencies": { | ||
| "1-liners": "^0.3.6" | ||
| } | ||
| } |
2905
0.21%1
Infinity%16
-11.11%+ Added
+ Added