Comparing version 0.0.3 to 0.0.4
13
index.js
module.exports.getAmount = function(arr) { | ||
return arr.reduce((total, item) => { | ||
total[item] = (total[item] || 0) + 1; | ||
return arr.reduce((total, currentItem) => { | ||
total[currentItem] = (total[currentItem] || 0) + 1; | ||
return total; | ||
@@ -13,1 +13,10 @@ }, {}); | ||
}; | ||
module.exports.getLongest = function(arr) { | ||
return arr.reduce((longestItemSoFar, currItem) => { | ||
if (currItem.length > longestItemSoFar.length) { | ||
return currItem; | ||
} | ||
return longestItemSoFar; | ||
}); | ||
}; |
{ | ||
"name": "pedash", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A lodash-like javascript helper -- for dummies", | ||
@@ -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
1069
19