@clerc/utils 1.0.0-beta.17 → 1.0.0-beta.18

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/dist/index.d.ts CHANGED
@@ -18,6 +18,7 @@ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
18
18
  type CamelCase<S extends string> = S extends `${infer Head} ${infer Tail}` ? `${Head}${Capitalize<CamelCase<Tail>>}` : S extends `${infer Head}-${infer Tail}` ? `${Head}${Capitalize<CamelCase<Tail>>}` : S;
19
19
  //#endregion
20
20
  //#region src/index.d.ts
21
+ declare const looseIsArray: <T>(arr: any) => arr is readonly T[];
21
22
  declare const toArray: <T>(a: MaybeArray<T>) => T[];
22
23
  /**
23
24
  * Converts a dash- or space-separated string to camelCase.
@@ -31,4 +32,4 @@ declare const formatVersion: (v: string) => string;
31
32
  declare const isTruthy: <T>(item: T) => item is Exclude<T, false | null | undefined>;
32
33
  declare const objectIsEmpty: (obj: Record<string, any>) => boolean;
33
34
  //#endregion
34
- export { CamelCase, DeepPrettify, IsAny, LiteralUnion, MaybeArray, PartialRequired, Prettify, ToArray, UnionToIntersection, camelCase, formatFlagName, formatVersion, isTruthy, joinWithAnd, kebabCase, objectIsEmpty, toArray };
35
+ export { CamelCase, DeepPrettify, IsAny, LiteralUnion, MaybeArray, PartialRequired, Prettify, ToArray, UnionToIntersection, camelCase, formatFlagName, formatVersion, isTruthy, joinWithAnd, kebabCase, looseIsArray, objectIsEmpty, toArray };
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  //#region src/index.ts
2
+ const looseIsArray = (arr) => Array.isArray(arr);
2
3
  const toArray = (a) => Array.isArray(a) ? a : [a];
3
4
  /**
4
5
  * Converts a dash- or space-separated string to camelCase.
@@ -33,4 +34,4 @@ const isTruthy = Boolean;
33
34
  const objectIsEmpty = (obj) => Object.keys(obj).length === 0;
34
35
 
35
36
  //#endregion
36
- export { camelCase, formatFlagName, formatVersion, isTruthy, joinWithAnd, kebabCase, objectIsEmpty, toArray };
37
+ export { camelCase, formatFlagName, formatVersion, isTruthy, joinWithAnd, kebabCase, looseIsArray, objectIsEmpty, toArray };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clerc/utils",
3
- "version": "1.0.0-beta.17",
3
+ "version": "1.0.0-beta.18",
4
4
  "author": "Ray <i@mk1.io> (https://github.com/so1ve)",
5
5
  "type": "module",
6
6
  "description": "Clerc utils",