@ooneex/utils 0.0.4 → 0.0.6
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/capitalizeWord.d.ts +2 -0
- package/dist/capitalizeWord.d.ts.map +1 -0
- package/dist/dataURLtoFile.d.ts +2 -0
- package/dist/dataURLtoFile.d.ts.map +1 -0
- package/dist/formatRelativeNumber.d.ts +5 -0
- package/dist/formatRelativeNumber.d.ts.map +1 -0
- package/dist/index.d.ts +16 -69
- package/dist/index.d.ts.map +1 -0
- package/dist/millisecondsToHMS.d.ts +2 -0
- package/dist/millisecondsToHMS.d.ts.map +1 -0
- package/dist/parseEnvVars.d.ts +2 -0
- package/dist/parseEnvVars.d.ts.map +1 -0
- package/dist/parseString.d.ts +2 -0
- package/dist/parseString.d.ts.map +1 -0
- package/dist/random.d.ts +6 -0
- package/dist/random.d.ts.map +1 -0
- package/dist/secondsToHMS.d.ts +2 -0
- package/dist/secondsToHMS.d.ts.map +1 -0
- package/dist/secondsToMS.d.ts +2 -0
- package/dist/secondsToMS.d.ts.map +1 -0
- package/dist/sleep.d.ts +2 -0
- package/dist/sleep.d.ts.map +1 -0
- package/dist/splitToWords.d.ts +2 -0
- package/dist/splitToWords.d.ts.map +1 -0
- package/dist/toCamelCase.d.ts +2 -0
- package/dist/toCamelCase.d.ts.map +1 -0
- package/dist/toKebabCase.d.ts +2 -0
- package/dist/toKebabCase.d.ts.map +1 -0
- package/dist/toPascalCase.d.ts +2 -0
- package/dist/toPascalCase.d.ts.map +1 -0
- package/dist/trim.d.ts +2 -0
- package/dist/trim.d.ts.map +1 -0
- package/package.json +11 -4
- package/tsconfig.build.json +14 -0
- package/tsconfig.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capitalizeWord.d.ts","sourceRoot":"","sources":["../src/capitalizeWord.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,KAAG,MAE7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataURLtoFile.d.ts","sourceRoot":"","sources":["../src/dataURLtoFile.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,EAAE,UAAU,MAAM,SAW9D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatRelativeNumber.d.ts","sourceRoot":"","sources":["../src/formatRelativeNumber.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,GAAI,KAAK,MAAM,EAAE,SAAS;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,MAMlG,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,69 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export const trim: (text: string, char?: string) => string;
|
|
18
|
-
}
|
|
19
|
-
declare module "parseString" {
|
|
20
|
-
export const parseString: <T = unknown>(text: string) => T;
|
|
21
|
-
}
|
|
22
|
-
declare module "splitToWords" {
|
|
23
|
-
export const splitToWords: (input: string) => RegExpMatchArray | [];
|
|
24
|
-
}
|
|
25
|
-
declare module "toCamelCase" {
|
|
26
|
-
export const toCamelCase: (input: string) => string;
|
|
27
|
-
}
|
|
28
|
-
declare module "parseEnvVars" {
|
|
29
|
-
export const parseEnvVars: <T = Record<string, unknown>>(envs: Record<string, unknown>) => T;
|
|
30
|
-
}
|
|
31
|
-
declare module "random" {
|
|
32
|
-
export const random: {
|
|
33
|
-
nanoid(size?: number): string;
|
|
34
|
-
stringInt(size?: number): string;
|
|
35
|
-
nanoidFactory(size?: number): (size?: number) => string;
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
declare module "secondsToHMS" {
|
|
39
|
-
export const secondsToHMS: (seconds: number) => string;
|
|
40
|
-
}
|
|
41
|
-
declare module "secondsToMS" {
|
|
42
|
-
export const secondsToMS: (seconds: number) => string;
|
|
43
|
-
}
|
|
44
|
-
declare module "sleep" {
|
|
45
|
-
export const sleep: (ms: number) => Promise<void>;
|
|
46
|
-
}
|
|
47
|
-
declare module "toKebabCase" {
|
|
48
|
-
export const toKebabCase: (input: string) => string;
|
|
49
|
-
}
|
|
50
|
-
declare module "toPascalCase" {
|
|
51
|
-
export const toPascalCase: (input: string) => string;
|
|
52
|
-
}
|
|
53
|
-
declare module "index" {
|
|
54
|
-
export { capitalizeWord } from "capitalizeWord";
|
|
55
|
-
export { dataURLtoFile } from "dataURLtoFile";
|
|
56
|
-
export { formatRelativeNumber } from "formatRelativeNumber";
|
|
57
|
-
export { millisecondsToHMS } from "millisecondsToHMS";
|
|
58
|
-
export { parseEnvVars } from "parseEnvVars";
|
|
59
|
-
export { parseString } from "parseString";
|
|
60
|
-
export { random } from "random";
|
|
61
|
-
export { secondsToHMS } from "secondsToHMS";
|
|
62
|
-
export { secondsToMS } from "secondsToMS";
|
|
63
|
-
export { sleep } from "sleep";
|
|
64
|
-
export { splitToWords } from "splitToWords";
|
|
65
|
-
export { toCamelCase } from "toCamelCase";
|
|
66
|
-
export { toKebabCase } from "toKebabCase";
|
|
67
|
-
export { toPascalCase } from "toPascalCase";
|
|
68
|
-
export { trim } from "trim";
|
|
69
|
-
}
|
|
1
|
+
export { capitalizeWord } from "./capitalizeWord";
|
|
2
|
+
export { dataURLtoFile } from "./dataURLtoFile";
|
|
3
|
+
export { formatRelativeNumber } from "./formatRelativeNumber";
|
|
4
|
+
export { millisecondsToHMS } from "./millisecondsToHMS";
|
|
5
|
+
export { parseEnvVars } from "./parseEnvVars";
|
|
6
|
+
export { parseString } from "./parseString";
|
|
7
|
+
export { random } from "./random";
|
|
8
|
+
export { secondsToHMS } from "./secondsToHMS";
|
|
9
|
+
export { secondsToMS } from "./secondsToMS";
|
|
10
|
+
export { sleep } from "./sleep";
|
|
11
|
+
export { splitToWords } from "./splitToWords";
|
|
12
|
+
export { toCamelCase } from "./toCamelCase";
|
|
13
|
+
export { toKebabCase } from "./toKebabCase";
|
|
14
|
+
export { toPascalCase } from "./toPascalCase";
|
|
15
|
+
export { trim } from "./trim";
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"millisecondsToHMS.d.ts","sourceRoot":"","sources":["../src/millisecondsToHMS.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,GAAI,IAAI,MAAM,KAAG,MAe9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseEnvVars.d.ts","sourceRoot":"","sources":["../src/parseEnvVars.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,GAAI,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,CAUzF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseString.d.ts","sourceRoot":"","sources":["../src/parseString.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,CAAC,GAAG,OAAO,EAAE,MAAM,MAAM,KAAG,CA4CvD,CAAC"}
|
package/dist/random.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../src/random.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM;kBACH,MAAM,GAAG,MAAM;qBAGZ,MAAM,GAAG,MAAM;yBAGX,MAAM,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,MAAM;CAGxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secondsToHMS.d.ts","sourceRoot":"","sources":["../src/secondsToHMS.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,GAAI,SAAS,MAAM,KAAG,MAe9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secondsToMS.d.ts","sourceRoot":"","sources":["../src/secondsToMS.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,KAAG,MAI7C,CAAC"}
|
package/dist/sleep.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../src/sleep.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,KAAG,OAAO,CAAC,IAAI,CAE9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitToWords.d.ts","sourceRoot":"","sources":["../src/splitToWords.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,0BAEzC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toCamelCase.d.ts","sourceRoot":"","sources":["../src/toCamelCase.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,MAI3C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toKebabCase.d.ts","sourceRoot":"","sources":["../src/toKebabCase.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,MAG3C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toPascalCase.d.ts","sourceRoot":"","sources":["../src/toPascalCase.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,MAG5C,CAAC"}
|
package/dist/trim.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trim.d.ts","sourceRoot":"","sources":["../src/trim.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,GAAI,MAAM,MAAM,EAAE,aAAU,KAAG,MAO/C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ooneex/utils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
5
|
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"main": "./dist/index.js",
|
|
14
|
+
"module": "./dist/index.js",
|
|
8
15
|
"license": "MIT",
|
|
9
16
|
"scripts": {
|
|
10
|
-
"compile": "tsc
|
|
17
|
+
"compile": "tsc -p tsconfig.build.json",
|
|
11
18
|
"build": "rm -rf dist && bun run compile && bun build ./src/index.ts --outdir ./dist --target browser --format esm --packages external --minify",
|
|
12
19
|
"publish": "bun run build && bun publish --access public"
|
|
13
20
|
},
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationMap": true,
|
|
8
|
+
"emitDeclarationOnly": true,
|
|
9
|
+
"outDir": "dist",
|
|
10
|
+
"strict": true,
|
|
11
|
+
"skipLibCheck": true
|
|
12
|
+
},
|
|
13
|
+
"include": ["src"]
|
|
14
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "../../tsconfig.json",
|
|
2
|
+
"extends": "../../tsconfig.build.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"baseUrl": ".",
|
|
5
5
|
"paths": {
|
|
6
6
|
"@/*": ["./src/*"]
|
|
7
7
|
}
|
|
8
8
|
},
|
|
9
|
-
"include": ["src
|
|
9
|
+
"include": ["src"],
|
|
10
10
|
"exclude": ["node_modules", "dist"]
|
|
11
11
|
}
|