@arcjet/sprintf
Advanced tools
+7
-7
| { | ||
| "name": "@arcjet/sprintf", | ||
| "version": "1.0.0-beta.9", | ||
| "version": "1.0.0-beta.10", | ||
| "description": "Arcjet platform-independent replacement for util.format", | ||
@@ -48,9 +48,9 @@ "keywords": [ | ||
| "devDependencies": { | ||
| "@arcjet/eslint-config": "1.0.0-beta.9", | ||
| "@arcjet/rollup-config": "1.0.0-beta.9", | ||
| "@arcjet/tsconfig": "1.0.0-beta.9", | ||
| "@rollup/wasm-node": "4.44.2", | ||
| "@arcjet/eslint-config": "1.0.0-beta.10", | ||
| "@arcjet/rollup-config": "1.0.0-beta.10", | ||
| "@arcjet/tsconfig": "1.0.0-beta.10", | ||
| "@rollup/wasm-node": "4.46.2", | ||
| "@types/node": "18.18.0", | ||
| "eslint": "9.30.1", | ||
| "typescript": "5.8.3" | ||
| "eslint": "9.32.0", | ||
| "typescript": "5.9.2" | ||
| }, | ||
@@ -57,0 +57,0 @@ "publishConfig": { |
+25
-18
@@ -26,9 +26,26 @@ <a href="https://arcjet.com" target="_arcjet-home"> | ||
| ## Installation | ||
| ## What is this? | ||
| ```shell | ||
| npm install -S @arcjet/sprintf | ||
| This is an internal utility to help us format log messages. | ||
| It’s a fork of [`pinojs/quick-format-unescaped`][quick-format-unescaped]. | ||
| We chose to fork so that we can maintain as much compatibility as possible | ||
| while being more restrictive. | ||
| ## When should I use this? | ||
| You should not use this but use | ||
| [`pinojs/quick-format-unescaped`][quick-format-unescaped] or one of the | ||
| alternatives instead. | ||
| This package matches our current needs which are likely different from yours. | ||
| ## Install | ||
| This package is ESM only. | ||
| Install with npm in Node.js: | ||
| ```sh | ||
| npm install @arcjet/sprintf | ||
| ``` | ||
| ## Example | ||
| ## Use | ||
@@ -38,4 +55,4 @@ ```ts | ||
| format("Hello %s", "world") === "Hello world"; | ||
| format("1 %i %d", 2, 3.0) === "1 2 3"; | ||
| console.log(format("Hello %s", "world")); // => "Hello world" | ||
| console.log(format("1 %i %d", 2, 3.0)); // => "1 2 3" | ||
| ``` | ||
@@ -60,19 +77,9 @@ | ||
| ## Implementation | ||
| This implementation of this library is based on [quick-format-unescaped], which | ||
| is licensed MIT with licenses included in our source code. | ||
| The goal of this library is to be more restrictive than `quick-format-unescaped` | ||
| while maintaining as much compatibility as possible, since [pino] uses it to | ||
| format strings. | ||
| ## License | ||
| Licensed under the [Apache License, Version 2.0][apache-license]. | ||
| [Apache License, Version 2.0][apache-license] © [Arcjet Labs, Inc.][arcjet] | ||
| [apache-license]: http://www.apache.org/licenses/LICENSE-2.0 | ||
| [arcjet]: https://arcjet.com | ||
| [node-util]: https://nodejs.org/docs/latest-v18.x/api/util.html#utilformatformat-args | ||
| [quick-format-unescaped]: https://github.com/pinojs/quick-format-unescaped/blob/20ebf64c2f2e182f97923a423d468757b9a24a63/index.js | ||
| [pino]: https://github.com/pinojs/pino | ||
| [apache-license]: http://www.apache.org/licenses/LICENSE-2.0 |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
22140
0.94%83
9.21%0
-100%