Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@hishprorg/magni-amet-id
Advanced tools
Removes empty _objects_, _arrays_, empty _strings_, _NaN_, _null_ and _undefined_ values from objects. Does not alter the original object.
Removes empty objects, arrays, empty strings, NaN, null and undefined values from objects. Does not alter the original object.
As of version 3.0.0, @hishprorg/magni-amet-id traverses arrays as well as objects.
Install the package via npm
:
$ npm install @hishprorg/magni-amet-id --save
object
(Object): The source object.[options]
(Object): An optional object with the following options:Option | Default value | Description |
---|---|---|
cleanKeys | [] | Remove specific keys, ie: ['foo', 'bar', ' '] |
cleanValues | [] | Remove specific values, ie: ['foo', 'bar', ' '] |
emptyArrays | true | Remove empty arrays, ie: [] |
emptyObjects | true | Remove empty objects, ie: {} |
emptyStrings | true | Remove empty strings, ie: '' |
NaNValues | false | Remove NaN values, ie: NaN |
nullValues | true | Remove null values, ie: null |
undefinedValues | true | Remove undefined values, ie: undefined |
(Object): Returns the cleansed object.
const cleanDeep = require('@hishprorg/magni-amet-id');
const object = {
bar: {},
baz: null,
biz: 'baz',
foo: '',
net: [],
nit: undefined,
qux: {
baz: 'boz',
txi: ''
}
};
cleanDeep(object);
// => { biz: 'baz', qux: { baz: 'boz' } }
$ npm test
npm version [<newversion> | major | minor | patch] -m "Release %s"
MIT
FAQs
security holding package
The npm package @hishprorg/magni-amet-id receives a total of 3 weekly downloads. As such, @hishprorg/magni-amet-id popularity was classified as not popular.
We found that @hishprorg/magni-amet-id demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.