@jdsalasc/solvejs 1.6.0 → 1.7.1

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 CHANGED
@@ -6,17 +6,17 @@
6
6
 
7
7
  Zero-dependency JavaScript and TypeScript utility suite for real production pain points.
8
8
 
9
- Includes date, string, list, regex, constants, numbers, validators, object, and async utilities.
10
-
11
- ## When to use this package
12
-
13
- Use it when your project needs multiple utility domains and you prefer one import surface over many package-level imports.
14
-
15
- ## Limitations and Constraints
16
-
17
- - Utilities prioritize predictable defaults over framework-specific abstractions.
18
- - Date and number helpers do not replace domain-specific finance/timezone libraries for regulated calculations.
19
- - Import package-level modules directly when you need strict control over bundle boundaries.
9
+ Includes date, string, list, regex, constants, numbers, validators, object, async, and env utilities.
10
+
11
+ ## When to use this package
12
+
13
+ Use it when your project needs multiple utility domains and you prefer one import surface over many package-level imports.
14
+
15
+ ## Limitations and Constraints
16
+
17
+ - Utilities prioritize predictable defaults over framework-specific abstractions.
18
+ - Date and number helpers do not replace domain-specific finance/timezone libraries for regulated calculations.
19
+ - Import package-level modules directly when you need strict control over bundle boundaries.
20
20
 
21
21
  ## Install
22
22
 
@@ -27,7 +27,7 @@ npm i @jdsalasc/solvejs
27
27
  ## Quick example
28
28
 
29
29
  ```ts
30
- import { parseDateStrict, slugify, uniqueBy, toNumber, deepMerge, retry } from "@jdsalasc/solvejs";
30
+ import { parseDateStrict, slugify, uniqueBy, toNumber, deepMerge, retry, getEnvBoolean } from "@jdsalasc/solvejs";
31
31
 
32
32
  parseDateStrict("2026-02-07", "YYYY-MM-DD");
33
33
  slugify("Build Better JS Apps");
@@ -35,6 +35,7 @@ uniqueBy([{ id: "a" }, { id: "a" }], (x) => x.id);
35
35
  toNumber("1,200");
36
36
  deepMerge({ app: { env: "dev" } }, { app: { version: 2 } });
37
37
  await retry(() => fetch("https://example.com/health"), { retries: 2, delayMs: 150 });
38
+ getEnvBoolean("ENABLE_CACHE", { ENABLE_CACHE: "true" });
38
39
  ```
39
40
 
40
41
  Docs cookbook and guides: `https://jdsalasca.github.io/solvejs/`
@@ -23,4 +23,5 @@ __exportStar(require("@jdsalasc/solvejs-numbers"), exports);
23
23
  __exportStar(require("@jdsalasc/solvejs-validators"), exports);
24
24
  __exportStar(require("@jdsalasc/solvejs-objects"), exports);
25
25
  __exportStar(require("@jdsalasc/solvejs-async"), exports);
26
+ __exportStar(require("@jdsalasc/solvejs-env"), exports);
26
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,2DAAyC;AACzC,yDAAuC;AACvC,0DAAwC;AACxC,8DAA4C;AAC5C,4DAA0C;AAC1C,+DAA6C;AAC7C,4DAA0C;AAC1C,0DAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,2DAAyC;AACzC,yDAAuC;AACvC,0DAAwC;AACxC,8DAA4C;AAC5C,4DAA0C;AAC1C,+DAA6C;AAC7C,4DAA0C;AAC1C,0DAAwC;AACxC,wDAAsC"}
@@ -7,3 +7,4 @@ export * from "@jdsalasc/solvejs-numbers";
7
7
  export * from "@jdsalasc/solvejs-validators";
8
8
  export * from "@jdsalasc/solvejs-objects";
9
9
  export * from "@jdsalasc/solvejs-async";
10
+ export * from "@jdsalasc/solvejs-env";
package/dist/esm/index.js CHANGED
@@ -7,4 +7,5 @@ export * from "@jdsalasc/solvejs-numbers";
7
7
  export * from "@jdsalasc/solvejs-validators";
8
8
  export * from "@jdsalasc/solvejs-objects";
9
9
  export * from "@jdsalasc/solvejs-async";
10
+ export * from "@jdsalasc/solvejs-env";
10
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jdsalasc/solvejs",
3
- "version": "1.6.0",
3
+ "version": "1.7.1",
4
4
  "description": "Zero-dependency JavaScript/TypeScript utility library for production apps: date parsing, string cleanup, list transforms, validators, numbers, regex, constants, objects, and async control.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -24,19 +24,20 @@
24
24
  "build:esm": "tsc -p tsconfig.esm.json",
25
25
  "build:cjs": "tsc -p tsconfig.cjs.json && node ./scripts/rename-cjs.mjs",
26
26
  "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
27
- "test": "node --test test/*.test.mjs",
28
- "lint": "tsc -p tsconfig.esm.json --noEmit"
27
+ "test": "npm run build && node --test test/*.test.mjs",
28
+ "lint": "tsc -p tsconfig.lint.json --noEmit"
29
29
  },
30
30
  "dependencies": {
31
- "@jdsalasc/solvejs-date": "1.5.2",
32
- "@jdsalasc/solvejs-string": "1.5.2",
33
- "@jdsalasc/solvejs-list": "1.5.2",
34
- "@jdsalasc/solvejs-regex": "1.5.2",
35
- "@jdsalasc/solvejs-constants": "1.5.2",
36
- "@jdsalasc/solvejs-numbers": "1.5.2",
37
- "@jdsalasc/solvejs-validators": "1.5.2",
38
- "@jdsalasc/solvejs-objects": "1.5.2",
39
- "@jdsalasc/solvejs-async": "1.5.2"
31
+ "@jdsalasc/solvejs-async": "1.7.1",
32
+ "@jdsalasc/solvejs-constants": "1.7.1",
33
+ "@jdsalasc/solvejs-date": "1.7.1",
34
+ "@jdsalasc/solvejs-env": "1.7.1",
35
+ "@jdsalasc/solvejs-list": "1.7.1",
36
+ "@jdsalasc/solvejs-numbers": "1.7.1",
37
+ "@jdsalasc/solvejs-objects": "1.7.1",
38
+ "@jdsalasc/solvejs-regex": "1.7.1",
39
+ "@jdsalasc/solvejs-string": "1.7.1",
40
+ "@jdsalasc/solvejs-validators": "1.7.1"
40
41
  },
41
42
  "publishConfig": {
42
43
  "access": "public"