@ts-utilities/core 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -15
- package/dist/index.cjs +1 -784
- package/dist/index.d.cts +61 -1
- package/dist/index.d.ts +61 -1
- package/dist/index.js +1 -765
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1260,6 +1260,66 @@ declare const isFalsy: (val: unknown) => val is Falsy;
|
|
|
1260
1260
|
* }
|
|
1261
1261
|
*/
|
|
1262
1262
|
declare const isNullish: (val: unknown) => val is null | undefined;
|
|
1263
|
+
/**
|
|
1264
|
+
* Type guard that checks if a value is a boolean.
|
|
1265
|
+
*
|
|
1266
|
+
* @param val - The value to check
|
|
1267
|
+
* @returns True if the value is a boolean, false otherwise
|
|
1268
|
+
*
|
|
1269
|
+
* @example
|
|
1270
|
+
* if (isBoolean(value)) {
|
|
1271
|
+
* console.log('Value is a boolean');
|
|
1272
|
+
* }
|
|
1273
|
+
*/
|
|
1274
|
+
declare const isBoolean: (val: unknown) => val is boolean;
|
|
1275
|
+
/**
|
|
1276
|
+
* Type guard that checks if a value is a string.
|
|
1277
|
+
*
|
|
1278
|
+
* @param val - The value to check
|
|
1279
|
+
* @returns True if the value is a string, false otherwise
|
|
1280
|
+
*
|
|
1281
|
+
* @example
|
|
1282
|
+
* if (isString(value)) {
|
|
1283
|
+
* console.log('Value is a string');
|
|
1284
|
+
* }
|
|
1285
|
+
*/
|
|
1286
|
+
declare const isString: (val: unknown) => val is string;
|
|
1287
|
+
/**
|
|
1288
|
+
* Type guard that checks if a value is a number.
|
|
1289
|
+
*
|
|
1290
|
+
* @param val - The value to check
|
|
1291
|
+
* @returns True if the value is a number, false otherwise
|
|
1292
|
+
*
|
|
1293
|
+
* @example
|
|
1294
|
+
* if (isNumber(value)) {
|
|
1295
|
+
* console.log('Value is a number');
|
|
1296
|
+
* }
|
|
1297
|
+
*/
|
|
1298
|
+
declare const isNumber: (val: unknown) => val is number;
|
|
1299
|
+
/**
|
|
1300
|
+
* Type guard that checks if a value is an array.
|
|
1301
|
+
*
|
|
1302
|
+
* @param val - The value to check
|
|
1303
|
+
* @returns True if the value is an array, false otherwise
|
|
1304
|
+
*
|
|
1305
|
+
* @example
|
|
1306
|
+
* if (isArray(value)) {
|
|
1307
|
+
* console.log('Value is an array');
|
|
1308
|
+
* }
|
|
1309
|
+
*/
|
|
1310
|
+
declare const isArray: (val: unknown) => val is unknown[];
|
|
1311
|
+
/**
|
|
1312
|
+
* Type guard that checks if a value is a function.
|
|
1313
|
+
*
|
|
1314
|
+
* @param val - The value to check
|
|
1315
|
+
* @returns True if the value is a function, false otherwise
|
|
1316
|
+
*
|
|
1317
|
+
* @example
|
|
1318
|
+
* if (isFunction(value)) {
|
|
1319
|
+
* console.log('Value is a function');
|
|
1320
|
+
* }
|
|
1321
|
+
*/
|
|
1322
|
+
declare const isFunction: (val: unknown) => val is Function;
|
|
1263
1323
|
/**
|
|
1264
1324
|
* Type guard that checks if a value is a primitive type.
|
|
1265
1325
|
*
|
|
@@ -1285,4 +1345,4 @@ declare const isPrimitive: (val: unknown) => val is Primitive;
|
|
|
1285
1345
|
*/
|
|
1286
1346
|
declare function isPlainObject(value: unknown): value is Record<string, any>;
|
|
1287
1347
|
//#endregion
|
|
1288
|
-
export { AND, AllOrNone, BUFFER, DeepMergeOptions, DeepPartial, DeepReadonly, DeepRequired, Diff, Falsy, IMPLIES, Intersection, Keys, KeysOfType, Maybe, Merge, Mutable, NAND, NOR, NOT, NestedKeyOf, Never, Nullable, Nullish, OR, OmitByType, OneOf, Optional, Prettify, Primitive, RequiredKeys, ScheduleOpts, SelectivePartial, SelectiveRequired, Substract, Task, TwoOf, Values, Without, XNOR, XNOR_Binary, XOR, XOR_Binary, convertToNormalCase, convertToSlug, debounce, deepmerge, escapeRegExp, extendProps, getObjectValue, hydrate, isFalsy, isNullish, isPlainObject, isPrimitive, normalizeText, poll, printf, schedule, shield, sleep, throttle };
|
|
1348
|
+
export { AND, AllOrNone, BUFFER, DeepMergeOptions, DeepPartial, DeepReadonly, DeepRequired, Diff, Falsy, IMPLIES, Intersection, Keys, KeysOfType, Maybe, Merge, Mutable, NAND, NOR, NOT, NestedKeyOf, Never, Nullable, Nullish, OR, OmitByType, OneOf, Optional, Prettify, Primitive, RequiredKeys, ScheduleOpts, SelectivePartial, SelectiveRequired, Substract, Task, TwoOf, Values, Without, XNOR, XNOR_Binary, XOR, XOR_Binary, convertToNormalCase, convertToSlug, debounce, deepmerge, escapeRegExp, extendProps, getObjectValue, hydrate, isArray, isBoolean, isFalsy, isFunction, isNullish, isNumber, isPlainObject, isPrimitive, isString, normalizeText, poll, printf, schedule, shield, sleep, throttle };
|
package/dist/index.d.ts
CHANGED
|
@@ -1260,6 +1260,66 @@ declare const isFalsy: (val: unknown) => val is Falsy;
|
|
|
1260
1260
|
* }
|
|
1261
1261
|
*/
|
|
1262
1262
|
declare const isNullish: (val: unknown) => val is null | undefined;
|
|
1263
|
+
/**
|
|
1264
|
+
* Type guard that checks if a value is a boolean.
|
|
1265
|
+
*
|
|
1266
|
+
* @param val - The value to check
|
|
1267
|
+
* @returns True if the value is a boolean, false otherwise
|
|
1268
|
+
*
|
|
1269
|
+
* @example
|
|
1270
|
+
* if (isBoolean(value)) {
|
|
1271
|
+
* console.log('Value is a boolean');
|
|
1272
|
+
* }
|
|
1273
|
+
*/
|
|
1274
|
+
declare const isBoolean: (val: unknown) => val is boolean;
|
|
1275
|
+
/**
|
|
1276
|
+
* Type guard that checks if a value is a string.
|
|
1277
|
+
*
|
|
1278
|
+
* @param val - The value to check
|
|
1279
|
+
* @returns True if the value is a string, false otherwise
|
|
1280
|
+
*
|
|
1281
|
+
* @example
|
|
1282
|
+
* if (isString(value)) {
|
|
1283
|
+
* console.log('Value is a string');
|
|
1284
|
+
* }
|
|
1285
|
+
*/
|
|
1286
|
+
declare const isString: (val: unknown) => val is string;
|
|
1287
|
+
/**
|
|
1288
|
+
* Type guard that checks if a value is a number.
|
|
1289
|
+
*
|
|
1290
|
+
* @param val - The value to check
|
|
1291
|
+
* @returns True if the value is a number, false otherwise
|
|
1292
|
+
*
|
|
1293
|
+
* @example
|
|
1294
|
+
* if (isNumber(value)) {
|
|
1295
|
+
* console.log('Value is a number');
|
|
1296
|
+
* }
|
|
1297
|
+
*/
|
|
1298
|
+
declare const isNumber: (val: unknown) => val is number;
|
|
1299
|
+
/**
|
|
1300
|
+
* Type guard that checks if a value is an array.
|
|
1301
|
+
*
|
|
1302
|
+
* @param val - The value to check
|
|
1303
|
+
* @returns True if the value is an array, false otherwise
|
|
1304
|
+
*
|
|
1305
|
+
* @example
|
|
1306
|
+
* if (isArray(value)) {
|
|
1307
|
+
* console.log('Value is an array');
|
|
1308
|
+
* }
|
|
1309
|
+
*/
|
|
1310
|
+
declare const isArray: (val: unknown) => val is unknown[];
|
|
1311
|
+
/**
|
|
1312
|
+
* Type guard that checks if a value is a function.
|
|
1313
|
+
*
|
|
1314
|
+
* @param val - The value to check
|
|
1315
|
+
* @returns True if the value is a function, false otherwise
|
|
1316
|
+
*
|
|
1317
|
+
* @example
|
|
1318
|
+
* if (isFunction(value)) {
|
|
1319
|
+
* console.log('Value is a function');
|
|
1320
|
+
* }
|
|
1321
|
+
*/
|
|
1322
|
+
declare const isFunction: (val: unknown) => val is Function;
|
|
1263
1323
|
/**
|
|
1264
1324
|
* Type guard that checks if a value is a primitive type.
|
|
1265
1325
|
*
|
|
@@ -1285,4 +1345,4 @@ declare const isPrimitive: (val: unknown) => val is Primitive;
|
|
|
1285
1345
|
*/
|
|
1286
1346
|
declare function isPlainObject(value: unknown): value is Record<string, any>;
|
|
1287
1347
|
//#endregion
|
|
1288
|
-
export { AND, AllOrNone, BUFFER, DeepMergeOptions, DeepPartial, DeepReadonly, DeepRequired, Diff, Falsy, IMPLIES, Intersection, Keys, KeysOfType, Maybe, Merge, Mutable, NAND, NOR, NOT, NestedKeyOf, Never, Nullable, Nullish, OR, OmitByType, OneOf, Optional, Prettify, Primitive, RequiredKeys, ScheduleOpts, SelectivePartial, SelectiveRequired, Substract, Task, TwoOf, Values, Without, XNOR, XNOR_Binary, XOR, XOR_Binary, convertToNormalCase, convertToSlug, debounce, deepmerge, escapeRegExp, extendProps, getObjectValue, hydrate, isFalsy, isNullish, isPlainObject, isPrimitive, normalizeText, poll, printf, schedule, shield, sleep, throttle };
|
|
1348
|
+
export { AND, AllOrNone, BUFFER, DeepMergeOptions, DeepPartial, DeepReadonly, DeepRequired, Diff, Falsy, IMPLIES, Intersection, Keys, KeysOfType, Maybe, Merge, Mutable, NAND, NOR, NOT, NestedKeyOf, Never, Nullable, Nullish, OR, OmitByType, OneOf, Optional, Prettify, Primitive, RequiredKeys, ScheduleOpts, SelectivePartial, SelectiveRequired, Substract, Task, TwoOf, Values, Without, XNOR, XNOR_Binary, XOR, XOR_Binary, convertToNormalCase, convertToSlug, debounce, deepmerge, escapeRegExp, extendProps, getObjectValue, hydrate, isArray, isBoolean, isFalsy, isFunction, isNullish, isNumber, isPlainObject, isPrimitive, isString, normalizeText, poll, printf, schedule, shield, sleep, throttle };
|