Socket
Socket
Sign inDemoInstall

@thi.ng/strings

Package Overview
Dependencies
Maintainers
1
Versions
191
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thi.ng/strings - npm Package Compare versions

Comparing version 3.7.17 to 3.7.18

2

CHANGELOG.md
# 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 -

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc