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

@bunt/is

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bunt/is - npm Package Compare versions

Comparing version 0.29.0 to 0.29.13

67

dist/esm/index.js

@@ -1,37 +0,58 @@

export const isNull = (value) => value === null;
export const isUndefined = (value) => typeof value === "undefined";
export const isVoid = (value) => typeof value === "undefined";
export const isDefined = (value) => typeof value !== "undefined";
export const isBoolean = (value) => typeof value === "boolean";
export const isString = (value) => typeof value === "string";
export const isArray = (value) => Array.isArray(value);
export const isNumber = (value) => {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isFulfilled = exports.isRejected = exports.isInstanceOf = exports.isError = exports.isObject = exports.isClass = exports.isArrowFunction = exports.isFunction = exports.isNotNullish = exports.isNullish = exports.isNumber = exports.isArray = exports.isString = exports.isBoolean = exports.isDefined = exports.isVoid = exports.isUndefined = exports.isNull = void 0;
const isNull = (value) => value === null;
exports.isNull = isNull;
const isUndefined = (value) => typeof value === "undefined";
exports.isUndefined = isUndefined;
const isVoid = (value) => typeof value === "undefined";
exports.isVoid = isVoid;
const isDefined = (value) => typeof value !== "undefined";
exports.isDefined = isDefined;
const isBoolean = (value) => typeof value === "boolean";
exports.isBoolean = isBoolean;
const isString = (value) => typeof value === "string";
exports.isString = isString;
const isArray = (value) => Array.isArray(value);
exports.isArray = isArray;
const isNumber = (value) => {
return typeof value === "number" && value === +value;
};
export const isNullish = (value) => isNull(value) || isUndefined(value);
export const isNotNullish = (value) => (!(isNull(value) || isUndefined(value)));
export const isFunction = (value) => {
return typeof value === "function" && !isClass(value);
exports.isNumber = isNumber;
const isNullish = (value) => (0, exports.isNull)(value) || (0, exports.isUndefined)(value);
exports.isNullish = isNullish;
const isNotNullish = (value) => (!((0, exports.isNull)(value) || (0, exports.isUndefined)(value)));
exports.isNotNullish = isNotNullish;
const isFunction = (value) => {
return typeof value === "function" && !(0, exports.isClass)(value);
};
export const isArrowFunction = (value) => {
return typeof value === "function" && isUndefined(value.prototype);
exports.isFunction = isFunction;
const isArrowFunction = (value) => {
return typeof value === "function" && (0, exports.isUndefined)(value.prototype);
};
export const isClass = (value) => {
exports.isArrowFunction = isArrowFunction;
const isClass = (value) => {
return typeof value === "function" && value.toString().startsWith("class");
};
export const isObject = (value) => {
return typeof value === "object" && !isNull(value) && !Array.isArray(value);
exports.isClass = isClass;
const isObject = (value) => {
return typeof value === "object" && !(0, exports.isNull)(value) && !Array.isArray(value);
};
export const isError = (value) => {
return typeof value === "object" && isInstanceOf(value, Error);
exports.isObject = isObject;
const isError = (value) => {
return typeof value === "object" && (0, exports.isInstanceOf)(value, Error);
};
export const isInstanceOf = (value, type) => {
return isObject(value) && value instanceof type;
exports.isError = isError;
const isInstanceOf = (value, type) => {
return (0, exports.isObject)(value) && value instanceof type;
};
export function isRejected(item) {
exports.isInstanceOf = isInstanceOf;
function isRejected(item) {
return item.status === "rejected";
}
export function isFulfilled(item) {
exports.isRejected = isRejected;
function isFulfilled(item) {
return item.status === "fulfilled";
}
exports.isFulfilled = isFulfilled;
//# sourceMappingURL=index.js.map
{
"name": "@bunt/is",
"version": "0.29.0",
"version": "0.29.13",
"keywords": [

@@ -37,5 +37,5 @@ "typescript"

"dependencies": {
"@bunt/type": "^0.29.0"
"@bunt/type": "^0.29.13"
},
"gitHead": "45b276a86d1093d2e0d573cc990dc10b618963a6"
"gitHead": "8eb5e57f43cfb71c79b4b5183207b2894ec4726d"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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