Comparing version 0.3.0 to 0.4.0
@@ -5,2 +5,7 @@ module.exports = { | ||
}, | ||
matches: function (re) { | ||
return function (str) { | ||
return re.test(str); | ||
}; | ||
}, | ||
pick: function (/* keys */) { | ||
@@ -7,0 +12,0 @@ var keys = Array.isArray(arguments[0]) ? arguments[0] : |
{ | ||
"name": "map-utils", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "map util functions, map, utils, pick, pluck, set, exists", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -15,2 +15,11 @@ var utils = require('../index.js'); | ||
describe('matches', function () { | ||
it('should return true if string matches', function () { | ||
utils.matches(/hello/)('hello').should.equal(true); | ||
}); | ||
it('should return false if string does not match', function () { | ||
utils.matches(/hey/)('hello').should.equal(false); | ||
}); | ||
}); | ||
describe('pick', function () { | ||
@@ -17,0 +26,0 @@ it('should pick a key from an object', function () { |
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
7424
188