New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

reject-empty

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reject-empty - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

22

index.js

@@ -8,14 +8,12 @@ /**

module.exports = function (o, omitZero) {
if (Array.isArray(o)) {
return o.filter(function (el) {
return !isEmpty(el, omitZero);
});
} else {
var tmp = {}, v;
Object.keys(o).forEach(function (k) {
v = o[k];
if (!isEmpty(v, omitZero)) tmp[k] = v;
});
return tmp;
}
if (Array.isArray(o)) return o.filter(function (el) {
return !isEmpty(el, omitZero);
});
var tmp = {}, v;
Object.keys(o).forEach(function (k) {
v = o[k];
if (!isEmpty(v, omitZero)) tmp[k] = v;
});
return tmp;
};

@@ -22,0 +20,0 @@

@@ -5,3 +5,3 @@ {

"author": "Ken Berkeley <kenberkeley@foxmail.com>",
"version": "1.0.0",
"version": "1.0.1",
"scripts": {

@@ -8,0 +8,0 @@ "test": "ava",

@@ -7,3 +7,3 @@ # rejectEmpty(sth `<array|object>`, omitZero `<Boolean>`)

> Omit empty values of an array|object
> Omit empty values of an array | object

@@ -10,0 +10,0 @@ ### Installation

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