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

@lightningspirit/isempty

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lightningspirit/isempty - npm Package Compare versions

Comparing version

to
0.2.1

21

dist/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isfalse = exports.isempty = exports.default = void 0;
const isempty = (value, { falseIsEmpty = false } = {}) => value === null ||
value === undefined ||
value === '' ||
falseIsEmpty && value === false ||
(value.constructor === Object && Object.keys(value).length === 0) ||
(Array.isArray(value) && value.length === 0) ||
(value.constructor === Map && value.size === 0) ||
(value.constructor === Set && value.size === 0);
var isempty = function (value, _a) {
var _b = _a === void 0 ? {} : _a, _c = _b.falseIsEmpty, falseIsEmpty = _c === void 0 ? false : _c;
return value === null ||
value === undefined ||
value === '' ||
(falseIsEmpty && value === false) ||
(value.constructor === Object && Object.keys(value).length === 0) ||
(Array.isArray(value) && value.length === 0) ||
(value.constructor === Map && value.size === 0) ||
(value.constructor === Set && value.size === 0);
};
exports.default = isempty;
exports.isempty = isempty;
const isfalse = (value) => value === false;
var isfalse = function (value) { return value === false; };
exports.isfalse = isfalse;
isempty.false = isfalse;
//# sourceMappingURL=index.js.map
{
"name": "@lightningspirit/isempty",
"version": "0.2.0",
"version": "0.2.1",
"description": "Test for the emptiness of any value",

@@ -26,7 +26,14 @@ "main": "dist/index.js",

"keywords": [
"is",
"empty",
"object",
"array",
"map",
"set",
"isempty",
"test",
"js",
"emptiness",
"test",
"isempty"
"ts",
"typescript",
"emptiness"
],

@@ -33,0 +40,0 @@ "author": "Vitor Carvalho <lightningspirit@gmail.com>",

Sorry, the diff of this file is not supported yet