Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 0.2.0 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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc