@thi.ng/strings
Advanced tools
Comparing version 3.7.17 to 3.7.18
# Change Log | ||
- **Last updated**: 2024-02-25T14:07:53Z | ||
- **Last updated**: 2024-02-28T14:23:30Z | ||
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub) | ||
@@ -5,0 +5,0 @@ |
{ | ||
"name": "@thi.ng/strings", | ||
"version": "3.7.17", | ||
"version": "3.7.18", | ||
"description": "Various string formatting & utility functions", | ||
@@ -206,3 +206,3 @@ "type": "module", | ||
}, | ||
"gitHead": "6e20f80dd9df1c8055ffa3c1e4d6f7598add0c0b\n" | ||
"gitHead": "190d68e7f7524631b333cfdbf32c6a23be27c166\n" | ||
} |
import type { Stringer } from "./api.js"; | ||
/** | ||
* Higher order version of `JSON.stringify()` with the option to treat strings | ||
* and numbers differently. If `all` is `false` (default), strings and numbers | ||
* are simply converted using `String(x)`. If `indent` is given, it will be used | ||
* for `JSON.stringify(x, null, indent)` | ||
* Higher order version of `JSON.stringify()` with the option to treat top-level | ||
* strings and numbers differently (i.e. NOT if they're nested values!). If | ||
* `all` is `false` (default), strings and numbers are simply converted using | ||
* `String(x)`. If `indent` is given, it will be used for `JSON.stringify(x, | ||
* null, indent)` | ||
* | ||
* @example | ||
* ```ts | ||
* import { stringify } from "@thi.ng/strings"; | ||
* | ||
* stringify()("hello"); | ||
* // hello | ||
* | ||
* stringify(true)("hello"); | ||
* // "hello" | ||
* | ||
* stringify()({ a: "hello" }) | ||
* // { "a": "hello" } | ||
* ``` | ||
* | ||
* @param all - | ||
@@ -9,0 +24,0 @@ * @param indent - |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97681
2032