Comparing version
@@ -17,8 +17,8 @@ import { Ctor, Newable } from "@bunt/type"; | ||
export declare const isClass: (value: unknown) => value is () => any; | ||
export declare const isObject: <T extends Record<any, any>>(value: any) => value is T; | ||
export declare const isObject: <T extends Record<any, any>>(value: T | any) => value is T; | ||
export declare const isError: (value: unknown) => value is Error; | ||
export type IIS<T> = T extends Ctor<infer S> ? S : T extends Newable<infer S> ? S : T; | ||
export declare const isInstanceOf: <C extends Ctor | Newable>(value: unknown, type: C) => value is IIS<C>; | ||
export declare const isInstanceOf: <C extends (Ctor | Newable)>(value: unknown, type: C) => value is IIS<C>; | ||
export declare function isRejected<T>(item: PromiseSettledResult<T>): item is PromiseRejectedResult; | ||
export declare function isFulfilled<T>(item: PromiseSettledResult<T>): item is PromiseFulfilledResult<T>; | ||
//# sourceMappingURL=index.d.ts.map |
"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.isNumberLessThan = exports.isNumberGreaterThan = exports.isNumber = exports.isArray = exports.isString = exports.isBoolean = exports.isDefined = exports.isVoid = exports.isUndefined = exports.isNull = void 0; | ||
exports.isInstanceOf = exports.isError = exports.isObject = exports.isClass = exports.isArrowFunction = exports.isFunction = exports.isNotNullish = exports.isNullish = exports.isNumberLessThan = exports.isNumberGreaterThan = exports.isNumber = exports.isArray = exports.isString = exports.isBoolean = exports.isDefined = exports.isVoid = exports.isUndefined = exports.isNull = void 0; | ||
exports.isRejected = isRejected; | ||
exports.isFulfilled = isFulfilled; | ||
const isNull = (value) => value === null; | ||
@@ -57,7 +59,5 @@ exports.isNull = isNull; | ||
} | ||
exports.isRejected = isRejected; | ||
function isFulfilled(item) { | ||
return item.status === "fulfilled"; | ||
} | ||
exports.isFulfilled = isFulfilled; | ||
//# sourceMappingURL=index.js.map |
@@ -17,8 +17,8 @@ import { Ctor, Newable } from "@bunt/type"; | ||
export declare const isClass: (value: unknown) => value is () => any; | ||
export declare const isObject: <T extends Record<any, any>>(value: any) => value is T; | ||
export declare const isObject: <T extends Record<any, any>>(value: T | any) => value is T; | ||
export declare const isError: (value: unknown) => value is Error; | ||
export type IIS<T> = T extends Ctor<infer S> ? S : T extends Newable<infer S> ? S : T; | ||
export declare const isInstanceOf: <C extends Ctor | Newable>(value: unknown, type: C) => value is IIS<C>; | ||
export declare const isInstanceOf: <C extends (Ctor | Newable)>(value: unknown, type: C) => value is IIS<C>; | ||
export declare function isRejected<T>(item: PromiseSettledResult<T>): item is PromiseRejectedResult; | ||
export declare function isFulfilled<T>(item: PromiseSettledResult<T>): item is PromiseFulfilledResult<T>; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "@bunt/is", | ||
"version": "0.29.19", | ||
"version": "0.30.0", | ||
"keywords": [ | ||
@@ -37,5 +37,5 @@ "typescript" | ||
"dependencies": { | ||
"@bunt/type": "^0.29.19" | ||
"@bunt/type": "^0.30.0" | ||
}, | ||
"gitHead": "878fc8a221c3eb57448495fe4f0c8f50cca2f271" | ||
"gitHead": "eeab4ccbf32313ff12690fab4bc5a783712a3c28" | ||
} |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
0
-100%82970
-7.56%+ Added
- Removed
Updated