extra-utils
Advanced tools
Comparing version 5.2.0 to 5.3.0
export * from './is-array.js'; | ||
export * from './is-empty-array.js'; |
export * from './is-array.js'; | ||
export * from './is-empty-array.js'; | ||
//# sourceMappingURL=index.js.map |
export declare function isArray<T>(val: unknown): val is Array<T>; | ||
export declare function isntArray<T>(val: T): val is Exclude<T, Array<unknown>>; |
@@ -0,0 +0,0 @@ export function isArray(val) { |
import { NonEmptyArray } from 'justypes'; | ||
export declare function isEmptyArray(val: unknown[]): boolean; | ||
export declare function isntEmptyArray<T>(val: T[]): val is NonEmptyArray<T>; |
@@ -0,0 +0,0 @@ export function isEmptyArray(val) { |
export * from './is-boolean.js'; | ||
export * from './is-falsy.js'; |
export * from './is-boolean.js'; | ||
export * from './is-falsy.js'; | ||
//# sourceMappingURL=index.js.map |
export declare function isBoolean(val: unknown): val is boolean; | ||
export declare function isntBoolean<T>(val: unknown): val is Exclude<T, boolean>; |
@@ -0,0 +0,0 @@ export function isBoolean(val) { |
import { Falsy } from 'justypes'; | ||
export declare function isFalsy(val: unknown): val is Falsy; | ||
export declare function isntFalsy<T>(val: T): val is Exclude<T, Falsy>; |
@@ -0,0 +0,0 @@ export function isFalsy(val) { |
export declare function inEnum<T>(val: unknown, _enum: object): val is T; | ||
export declare function notInEnum<T, U>(val: T, _enum: object): val is Exclude<T, U>; |
@@ -0,0 +0,0 @@ export function inEnum(val, _enum) { |
@@ -0,1 +1,2 @@ | ||
export * from './array-like/index.js'; | ||
export * from './array/index.js'; | ||
@@ -2,0 +3,0 @@ export * from './boolean/index.js'; |
@@ -0,1 +1,2 @@ | ||
export * from './array-like/index.js'; | ||
export * from './array/index.js'; | ||
@@ -2,0 +3,0 @@ export * from './boolean/index.js'; |
export declare function isDate(val: unknown): val is Date; | ||
export declare function isntDate<T>(val: T): val is Exclude<T, Date>; |
@@ -0,0 +0,0 @@ export function isDate(val) { |
export declare function isFunction<T extends Function = (...args: any[]) => any>(val: unknown): val is T; | ||
export declare function isntFunction<T>(val: T): val is Exclude<T, Function>; |
@@ -0,0 +0,0 @@ export function isFunction(val) { |
export declare function isRegExp(val: unknown): val is RegExp; | ||
export declare function isntRegExp<T>(val: T): val is Exclude<T, RegExp>; |
@@ -0,0 +0,0 @@ export function isRegExp(val) { |
export declare function isSymbol(val: unknown): val is symbol; | ||
export declare function isntSymbol<T>(val: T): val is Exclude<T, symbol>; |
@@ -0,0 +0,0 @@ export function isSymbol(val) { |
export * from './is-json-value.js'; | ||
export * from './is-json-serializable.js'; |
export * from './is-json-value.js'; | ||
export * from './is-json-serializable.js'; | ||
//# sourceMappingURL=index.js.map |
import { JSONValue, JSONSerializable } from 'justypes'; | ||
export declare function isJSONSerializable<T extends JSONValue | Record<string, JSONValue | JSONSerializable<any>> | Array<JSONValue | JSONSerializable<any>>>(val: unknown): val is JSONSerializable<T>; | ||
export declare function isntJSONSerializable<T>(val: T): val is Exclude<T, JSONSerializable<any>>; |
@@ -0,0 +0,0 @@ import { isObject } from "../object/index.js"; |
import { JSONValue } from 'justypes'; | ||
export declare function isJSONValue(val: unknown): val is JSONValue; | ||
export declare function isntJSONValue<T>(val: T): val is Exclude<T, JSONValue>; |
@@ -0,0 +0,0 @@ import { isNull } from "../nullish/index.js"; |
export * from './is-null.js'; | ||
export * from './is-undefined.js'; | ||
export * from './is-nullish.js'; |
@@ -0,0 +0,0 @@ export * from './is-null.js'; |
export declare function isNull(val: unknown): val is null; | ||
export declare function isntNull<T>(val: T): val is Exclude<T, null>; |
@@ -0,0 +0,0 @@ export function isNull(val) { |
import { Nullish } from 'justypes'; | ||
export declare function isNullish(val: unknown): val is Nullish; | ||
export declare function isntNullish<T>(val: T): val is Exclude<T, Nullish>; |
@@ -0,0 +0,0 @@ import { isNull } from './is-null.js'; |
export declare function isUndefined(val: unknown): val is undefined; | ||
export declare function isntUndefined<T>(val: T): val is Exclude<T, undefined>; |
@@ -0,0 +0,0 @@ export function isUndefined(val) { |
@@ -0,0 +0,0 @@ export * from './is-bigint.js'; |
@@ -0,0 +0,0 @@ export * from './is-bigint.js'; |
export declare function isBigInt(val: unknown): val is bigint; | ||
export declare function isntBigInt<T>(val: T): val is Exclude<T, bigint>; |
@@ -0,0 +0,0 @@ export function isBigInt(val) { |
export declare function isFinite(val: number): boolean; |
@@ -0,0 +0,0 @@ export function isFinite(val) { |
export declare function isPositiveInfinity(val: number): boolean; | ||
export declare function isNegativeInfinity(val: number): boolean; |
@@ -0,0 +0,0 @@ export function isPositiveInfinity(val) { |
export declare function isNaN(val: number): boolean; | ||
export declare function isntNaN(val: number): boolean; |
@@ -0,0 +0,0 @@ export function isNaN(val) { |
export declare function isNumber(val: unknown): val is number; | ||
export declare function isntNumber<T>(val: T): val is Exclude<T, number>; |
@@ -0,0 +0,0 @@ export function isNumber(val) { |
export * from './is-empty-object.js'; | ||
export * from './is-object.js'; | ||
export * from './is-plain-object.js'; |
@@ -0,0 +0,0 @@ export * from './is-empty-object.js'; |
export declare function isEmptyObject(val: object): boolean; | ||
export declare function isntEmptyObject(val: object): boolean; |
@@ -0,0 +0,0 @@ export function isEmptyObject(val) { |
export declare function isObject(val: unknown): val is object & Record<string | symbol | number, unknown>; | ||
export declare function isntObject<T>(val: T): val is Exclude<T, object & Record<string | symbol | number, unknown>>; |
@@ -0,0 +0,0 @@ export function isObject(val) { |
export declare function isPlainObject(val: unknown): val is object & Record<string | symbol | number, unknown>; | ||
export declare function isntPlainObject<T>(val: T): val is Exclude<T, object & Record<string | symbol | number, unknown>>; |
@@ -0,0 +0,0 @@ import { isPlainObject as isPlainObjectByLodash } from 'lodash-es'; |
@@ -0,0 +0,0 @@ import { Awaitable } from 'justypes'; |
@@ -0,0 +0,0 @@ export async function pipeAsync(value, ...operators) { |
@@ -0,0 +0,0 @@ export declare function pipe<A, B, C, D, E, F, G, H>(value: A, ...operators: [ |
@@ -0,0 +0,0 @@ export function pipe(value, ...operators) { |
@@ -0,0 +0,0 @@ export * from './is-char.js'; |
@@ -0,0 +0,0 @@ export * from './is-char.js'; |
export declare function isChar(val: unknown): val is string; | ||
export declare function isntChar(val: unknown): boolean; |
@@ -0,0 +0,0 @@ import { isString } from './is-string.js'; |
export declare function isString(val: unknown): val is string; | ||
export declare function isntString<T>(val: T): val is Exclude<T, string>; |
@@ -0,0 +0,0 @@ export function isString(val) { |
export declare function isURLString(text: string): boolean; | ||
export declare function isntURLString(text: string): boolean; |
@@ -0,0 +0,0 @@ export function isURLString(text) { |
export declare function removeBlankLines(text: string): string; |
@@ -0,0 +0,0 @@ import { isntBlankLine } from './utils.js'; |
export declare function removeExtraIndents(text: string, { ignoreBlankLines }?: { | ||
ignoreBlankLines?: boolean; | ||
}): string; |
@@ -0,0 +0,0 @@ import { isntBlankLine } from './utils.js'; |
export declare function removeLeadingBlankLines(text: string, maxRemovals?: number): string; |
@@ -0,0 +0,0 @@ import { isBlankLine } from './utils.js'; |
export declare function removeTrailingBlankLines(text: string, maxRemovals?: number): string; |
@@ -0,0 +0,0 @@ import { isBlankLine } from './utils.js'; |
export declare function toString(val: unknown): string; |
@@ -0,0 +0,0 @@ export function toString(val) { |
export declare function isBlankLine(line: string): boolean; | ||
export declare function isntBlankLine(line: string): boolean; |
@@ -0,0 +0,0 @@ export function isBlankLine(line) { |
{ | ||
"name": "extra-utils", | ||
"version": "5.2.0", | ||
"version": "5.3.0", | ||
"description": "Utilities for JavaScript and Typescript", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -12,2 +12,8 @@ # extra-utils | ||
## API | ||
### ArrayLike | ||
```ts | ||
function first<T>(arr: ArrayLike<T>): T | undefined | ||
function last<T>(arr: ArrayLike<T>): T | undefined | ||
``` | ||
### Array | ||
@@ -14,0 +20,0 @@ ```ts |
@@ -0,1 +1,2 @@ | ||
export * from './array-like/index.js' | ||
export * from './array/index.js' | ||
@@ -2,0 +3,0 @@ export * from './boolean/index.js' |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75651
180
977
361