@bccampus/utils 0.2.2 → 0.2.3
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/array/index.d.ts +2 -1
- package/dist/date/index.d.ts +3 -1
- package/dist/duration/index.d.ts +4 -3
- package/dist/format/index.d.ts +5 -3
- package/dist/index.cjs +0 -3
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -4
- package/dist/object/index.d.ts +6 -5
- package/dist/path/index.d.ts +4 -2
- package/dist/set/index.d.ts +6 -5
- package/dist/string/index.d.ts +8 -6
- package/dist/value/index.d.ts +2 -1
- package/package.json +6 -1
- package/eslint.config.js +0 -19
- package/src/array/chunk.ts +0 -6
- package/src/array/index.ts +0 -1
- package/src/date/index.ts +0 -1
- package/src/date/iso-date-time.ts +0 -356
- package/src/duration/add-durations.ts +0 -16
- package/src/duration/index.ts +0 -3
- package/src/duration/is-duration.ts +0 -5
- package/src/duration/to-number.ts +0 -18
- package/src/format/formatter.ts +0 -37
- package/src/format/index.ts +0 -3
- package/src/format/stringify.ts +0 -87
- package/src/format/template.ts +0 -48
- package/src/index.ts +0 -1
- package/src/object/get.ts +0 -9
- package/src/object/index.ts +0 -5
- package/src/object/is-object.ts +0 -2
- package/src/object/omit.ts +0 -21
- package/src/object/pick.ts +0 -10
- package/src/object/set.ts +0 -15
- package/src/path/file-url-to-path.ts +0 -12
- package/src/path/index.ts +0 -2
- package/src/path/normalize.ts +0 -72
- package/src/set/difference.ts +0 -9
- package/src/set/index.ts +0 -5
- package/src/set/intersection.ts +0 -12
- package/src/set/is-superset.ts +0 -12
- package/src/set/symmetric-difference.ts +0 -12
- package/src/set/union.ts +0 -8
- package/src/string/capitalize.ts +0 -2
- package/src/string/index.ts +0 -6
- package/src/string/normalize.ts +0 -7
- package/src/string/pluralize/index.ts +0 -7
- package/src/string/pluralize/pluralize.ts +0 -296
- package/src/string/pluralize/rules/index.ts +0 -4
- package/src/string/pluralize/rules/irregular.ts +0 -59
- package/src/string/pluralize/rules/pluralization.ts +0 -40
- package/src/string/pluralize/rules/singularization.ts +0 -46
- package/src/string/pluralize/rules/uncountable.ts +0 -107
- package/src/string/pluralize/types.ts +0 -4
- package/src/string/slugify/index.ts +0 -3
- package/src/string/strip-html-tags.ts +0 -4
- package/src/string/to-int.ts +0 -20
- package/src/string/to-sentence-case.ts +0 -6
- package/src/string/trim.ts +0 -11
- package/src/string/truncate.ts +0 -44
- package/src/value/index.ts +0 -1
- package/src/value/is-empty.ts +0 -31
- package/tsconfig.json +0 -18
- package/tsconfig.lib.json +0 -37
- package/tsconfig.node.json +0 -25
- package/vite.config.ts +0 -76
package/tsconfig.json
DELETED
package/tsconfig.lib.json
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"outDir": "./dist",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"target": "ESNext",
|
|
6
|
-
"lib": [
|
|
7
|
-
"DOM",
|
|
8
|
-
"ESNext"
|
|
9
|
-
],
|
|
10
|
-
"strict": true,
|
|
11
|
-
"esModuleInterop": true,
|
|
12
|
-
"jsx": "preserve",
|
|
13
|
-
"skipLibCheck": true,
|
|
14
|
-
"moduleResolution": "bundler",
|
|
15
|
-
"resolveJsonModule": true,
|
|
16
|
-
"noUnusedLocals": true,
|
|
17
|
-
"strictNullChecks": true,
|
|
18
|
-
"allowJs": true,
|
|
19
|
-
"forceConsistentCasingInFileNames": true,
|
|
20
|
-
"noEmit": true,
|
|
21
|
-
"types": [
|
|
22
|
-
"node",
|
|
23
|
-
],
|
|
24
|
-
"paths": {
|
|
25
|
-
"@/*": [
|
|
26
|
-
"./src/*"
|
|
27
|
-
],
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"include": [
|
|
31
|
-
"src/**/*",
|
|
32
|
-
],
|
|
33
|
-
"exclude": [
|
|
34
|
-
"dist",
|
|
35
|
-
"node_modules"
|
|
36
|
-
]
|
|
37
|
-
}
|
package/tsconfig.node.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
|
-
"target": "ES2023",
|
|
5
|
-
"lib": ["ES2023"],
|
|
6
|
-
"module": "ESNext",
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
|
|
9
|
-
/* Bundler mode */
|
|
10
|
-
"moduleResolution": "bundler",
|
|
11
|
-
"allowImportingTsExtensions": true,
|
|
12
|
-
"verbatimModuleSyntax": true,
|
|
13
|
-
"moduleDetection": "force",
|
|
14
|
-
"noEmit": true,
|
|
15
|
-
|
|
16
|
-
/* Linting */
|
|
17
|
-
"strict": true,
|
|
18
|
-
"noUnusedLocals": true,
|
|
19
|
-
"noUnusedParameters": true,
|
|
20
|
-
"erasableSyntaxOnly": true,
|
|
21
|
-
"noFallthroughCasesInSwitch": true,
|
|
22
|
-
"noUncheckedSideEffectImports": true
|
|
23
|
-
},
|
|
24
|
-
"include": ["vite.config.ts"]
|
|
25
|
-
}
|
package/vite.config.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { fileURLToPath } from "node:url";
|
|
3
|
-
import { globSync } from "tinyglobby";
|
|
4
|
-
import { defineConfig } from "vite";
|
|
5
|
-
import dts from "vite-plugin-dts";
|
|
6
|
-
import packageConfig from "./package.json";
|
|
7
|
-
import { writeFileSync } from "node:fs";
|
|
8
|
-
|
|
9
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
10
|
-
const outDir = "./dist";
|
|
11
|
-
|
|
12
|
-
const createEntries = () => {
|
|
13
|
-
const entries = new Map<string, string>();
|
|
14
|
-
const exports = new Map<
|
|
15
|
-
string,
|
|
16
|
-
{
|
|
17
|
-
types: string;
|
|
18
|
-
import: string;
|
|
19
|
-
require: string;
|
|
20
|
-
}
|
|
21
|
-
>();
|
|
22
|
-
|
|
23
|
-
const files = globSync("src/**/*.ts", {
|
|
24
|
-
cwd: __dirname,
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
for (const file of files) {
|
|
28
|
-
const filePath = file.split(".")[0].replace(/^src[/\\]/, "");
|
|
29
|
-
|
|
30
|
-
if (!filePath) {
|
|
31
|
-
continue;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const filePathParts = filePath.split("/");
|
|
35
|
-
if (filePathParts.at(-1) === "index" && filePathParts.length <= 3) {
|
|
36
|
-
const exportPath = filePathParts.length === 1 ? "." : `./${filePathParts.slice(0, -1).join("/")}`;
|
|
37
|
-
|
|
38
|
-
exports.set(exportPath, {
|
|
39
|
-
types: `${outDir}/${filePath}.d.ts`,
|
|
40
|
-
import: `${outDir}/${filePath}.js`,
|
|
41
|
-
require: `${outDir}/${filePath}.cjs`,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
entries.set(filePath, fileURLToPath(new URL(file, import.meta.url)));
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const _packageConfig = {
|
|
49
|
-
...packageConfig,
|
|
50
|
-
exports: Object.fromEntries([...exports].sort((a, b) => a[0].localeCompare(b[0]))),
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
writeFileSync("./package.json", JSON.stringify(_packageConfig, null, 2), {
|
|
54
|
-
encoding: "utf-8",
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
return Object.fromEntries(entries);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export default defineConfig({
|
|
61
|
-
plugins: [dts({ tsconfigPath: "./tsconfig.lib.json" })],
|
|
62
|
-
resolve: {
|
|
63
|
-
alias: {
|
|
64
|
-
"@": path.resolve(__dirname, "./src"),
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
build: {
|
|
68
|
-
minify: false,
|
|
69
|
-
copyPublicDir: false,
|
|
70
|
-
lib: {
|
|
71
|
-
entry: createEntries(),
|
|
72
|
-
name: "utils",
|
|
73
|
-
formats: ["es", "cjs"],
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
});
|