Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wodge

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wodge - npm Package Compare versions

Comparing version 0.7.0 to 0.8.0

test/without.js

23

lib/wodge.js

@@ -433,6 +433,7 @@ "use strict";

/**
Returns the input array, minus the specied values
@param {Array} - the input array
If the input is an array, returns the input minus the specified values.
If the input is an object, it returns a clone of the object minus the specified properties.
@param {Array|Object} - the input array or object
@param {*} - a single, or array of values to omit
@returns {Array}
@returns {Array|Object}
@example

@@ -444,7 +445,15 @@ > w.without([ 1, 2, 3 ], 2)

*/
function without(array, toRemove){
function without(input, toRemove){
toRemove = arrayify(toRemove);
return array.filter(function(item){
return !exists(toRemove, item);
});
if (Array.isArray(input)){
return input.filter(function(item){
return !exists(toRemove, item);
});
} else {
var output = clone(input);
toRemove.forEach(function(remove){
delete output[remove];
});
return output;
}
}

@@ -451,0 +460,0 @@

{
"name": "wodge",
"version": "0.7.0",
"version": "0.8.0",
"description": "a wodge of functional dough",

@@ -5,0 +5,0 @@ "main": "lib/wodge.js",

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