@ndhoule/keys
Advanced tools
Comparing version 1.1.1 to 2.0.0
@@ -0,1 +1,5 @@ | ||
## 2.0.0 | ||
- Remove Component/Duo support | ||
## 1.1.1 | ||
@@ -2,0 +6,0 @@ |
38
index.js
'use strict'; | ||
/** | ||
* charAt reference. | ||
*/ | ||
var hop = Object.prototype.hasOwnProperty; | ||
var strCharAt = String.prototype.charAt; | ||
var toStr = Object.prototype.toString; | ||
@@ -16,3 +14,2 @@ /** | ||
*/ | ||
// TODO: Move to a library | ||
@@ -24,14 +21,2 @@ var charAt = function(str, index) { | ||
/** | ||
* hasOwnProperty reference. | ||
*/ | ||
var hop = Object.prototype.hasOwnProperty; | ||
/** | ||
* Object.prototype.toString reference. | ||
*/ | ||
var toStr = Object.prototype.toString; | ||
/** | ||
* hasOwnProperty, wrapped as a function. | ||
@@ -75,3 +60,2 @@ * | ||
*/ | ||
// TODO: Move to a library | ||
@@ -89,8 +73,8 @@ var isArrayLike = function isArrayLike(val) { | ||
* @param {} target | ||
* @param {} pred | ||
* @param {Function} pred | ||
* @return {Array} | ||
*/ | ||
var indexKeys = function indexKeys(target, pred) { | ||
pred = pred || has; | ||
var results = []; | ||
@@ -108,3 +92,3 @@ | ||
/** | ||
* Returns an array of all the owned | ||
* Returns an array of an object's owned keys. | ||
* | ||
@@ -118,8 +102,7 @@ * @name objectKeys | ||
*/ | ||
var objectKeys = function objectKeys(target, pred) { | ||
pred = pred || has; | ||
var results = []; | ||
for (var key in target) { | ||
@@ -166,4 +149,3 @@ if (pred(target, key)) { | ||
*/ | ||
module.exports = function keys(source) { | ||
var keys = function keys(source) { | ||
if (source == null) { | ||
@@ -185,1 +167,7 @@ return []; | ||
}; | ||
/* | ||
* Exports. | ||
*/ | ||
module.exports = keys; |
{ | ||
"name": "@ndhoule/keys", | ||
"version": "1.1.1", | ||
"version": "2.0.0", | ||
"description": "Create an array of the owned/enumerable keys of an input object.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11122
224