🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

map-utils

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

map-utils - npm Package Compare versions

Comparing version

to
0.4.0

5

index.js

@@ -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] :

2

package.json
{
"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 () {