Data Type Methods: A Collection of methods to operate against data types in JavaScript.
npm install @confused-techie/dtmbash
> npm install @confused-techie/dtm
`
API
$3
Data Type Methods: A Collection of methods to operate against data types in JavaScript.
`javascript
const dtm = require("@confused-techie/dtm");
`
$3
Deduplicates the provided array, returning a new array without duplicates.
Works only on arrays of Strings, Numbers, Booleans.
Parameters:
- value <*>: The Array to Deduplicate
Returns:
- <*>: Returns an array of values, deduplicated.
$3
Determines the rough size of the object in memory, in bytes.
Parameters:
- value <*>: The value to inspect.
Returns:
- : Returns the integer value of the object in bytes.
$3
Determines not only if the input value is an array, but also if
contains any content.
Parameters:
- value <*>: The value to inspect.
Returns:
- : True if the provided input is an array, and has a length
longer than 0. False if either the input value is not an array, or has a length
of 0.
$3
Determines if the input value is null.
Parameters:
- value <*>: The value to inspect.
Returns:
- : Returns true if the value is null, returns false if the value
is any other valid data type, including undefined` or other falsy values.