🚀 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.3.0

3

index.js

@@ -6,3 +6,4 @@ module.exports = {

pick: function (/* keys */) {
var keys = Array.prototype.slice.call(arguments);
var keys = Array.isArray(arguments[0]) ? arguments[0] :
Array.prototype.slice.call(arguments);
return function (obj) {

@@ -9,0 +10,0 @@ var out = {};

{
"name": "map-utils",
"version": "0.2.0",
"version": "0.3.0",
"description": "map util functions, map, utils, pick, pluck, set, exists",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -35,2 +35,13 @@ var utils = require('../index.js');

});
it('should pick multiple keys from an object (as an array)', function () {
var obj = {
foo: 1,
bar: 2,
qux: 3
};
utils.pick(['foo', 'qux'])(obj).should.eql({
foo: 1,
qux: 3
});
});
});

@@ -37,0 +48,0 @@