@abumble/design-system 0.0.8 → 0.0.9
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/lib/utils.d.ts +2 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js.map +1 -1
- package/package.json +1 -1
package/dist/lib/utils.d.ts
CHANGED
|
@@ -5,4 +5,6 @@ export declare function cn(...inputs: Array<ClassValue>): string;
|
|
|
5
5
|
* @param {number} max - The maximum possible number (inclusive).
|
|
6
6
|
*/
|
|
7
7
|
export declare function getRandomIntUpTo(max: number): number;
|
|
8
|
+
export declare function stringToBoolean(str: string | null): boolean;
|
|
9
|
+
export declare function booleanToString(bool: boolean | null): string;
|
|
8
10
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIvC,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,UAAU,CAAC,UAE9C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,UAG3C"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIvC,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,UAAU,CAAC,UAE9C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,UAG3C;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAG3D;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,GAAG,MAAM,CAG5D"}
|
package/dist/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../src/lib/utils.ts"],"sourcesContent":["import type { ClassValue } from 'clsx';\nimport { clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: Array<ClassValue>) {\n\treturn twMerge(clsx(inputs))\n}\n\n/**\n * Returns a random integer between 0 and max, inclusive.\n * @param {number} max - The maximum possible number (inclusive).\n */\nexport function getRandomIntUpTo(max: number) {\n\t// We use (max + 1) to make 'max' inclusive after Math.floor()\n\treturn Math.floor(Math.random() * (max + 1));\n}\n\n"],"names":["cn","inputs","twMerge","clsx"],"mappings":";;AAIO,SAASA,KAAMC,GAA2B;AAChD,SAAOC,EAAQC,EAAKF,CAAM,CAAC;AAC5B;"}
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../src/lib/utils.ts"],"sourcesContent":["import type { ClassValue } from 'clsx';\nimport { clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: Array<ClassValue>) {\n\treturn twMerge(clsx(inputs))\n}\n\n/**\n * Returns a random integer between 0 and max, inclusive.\n * @param {number} max - The maximum possible number (inclusive).\n */\nexport function getRandomIntUpTo(max: number) {\n\t// We use (max + 1) to make 'max' inclusive after Math.floor()\n\treturn Math.floor(Math.random() * (max + 1));\n}\n\nexport function stringToBoolean(str: string | null): boolean {\n\tif (!str) return false;\n\treturn [\"true\", \"1\", \"yes\"].includes(str.trim().toLowerCase());\n}\n\nexport function booleanToString(bool: boolean | null): string {\n\tif (!bool) return false.toString();\n\treturn bool.toString();\n}\n\n"],"names":["cn","inputs","twMerge","clsx"],"mappings":";;AAIO,SAASA,KAAMC,GAA2B;AAChD,SAAOC,EAAQC,EAAKF,CAAM,CAAC;AAC5B;"}
|