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.3.0 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 () {

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