This package is platform-independent in order to support multiple runtimes in varying environments, such as Edge Runtime, Node.js, Bun, Deno, and Cloudflare Workers.
Substitutions will be made for the following character sequences if the matching
argument conforms to the type. For example, "%d" will only be replaced by a
number, not a string or object.
Object substitution supports any value that is not undefined.
%d | %f - Replaced if provided with a number.
%i - Replaced if provided with a number after Math.floor is called on it.
%O | %o | %j - Replaced if provided with any value after
JSON.stringify is called on it. Objects with circular references will be
replaced with [Circular]. Functions will be replaced with the function name
or <anonymous> if unnamed.
%s - Replaced if provided with a string.
%% - Replaced by the literal % character.
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.
sdk: Inform type signature of protect via global characteristics (#1043) (1ae4a89), closes #1042
📦 Dependencies
Bump @typescript-eslint/eslint-plugin from 7.13.0 to 7.13.1 (#994) (9481c7f)
Bump @typescript-eslint/eslint-plugin from 7.13.1 to 7.14.1 (#1025) (7e8cc60)
Bump @typescript-eslint/parser from 7.13.0 to 7.13.1 (#993) (d15a09d)
Bump @typescript-eslint/parser from 7.13.1 to 7.14.1 (#1024) (ee81b09)
Bump eslint-config-turbo from 2.0.4 to 2.0.5 (#1023) (aaaf17c)
Bump eslint-config-turbo from 2.0.5 to 2.0.6 (#1052) (e1d3cd3)
dev: Bump bun-types from 1.1.13 to 1.1.17 (#1022) (3aa7181)
dev: Bump typescript from 5.4.5 to 5.5.2 (#1011) (c17a101)
example: Bump @clerk/nextjs from 5.1.5 to 5.1.6 in /examples/nextjs-14-clerk-rl in the dependencies group (#1013) (8bed1dc)
example: Bump @clerk/nextjs from 5.1.5 to 5.1.6 in /examples/nextjs-14-clerk-shield in the dependencies group (#1012) (c4bcde8)
example: Bump @sveltejs/kit from 2.5.17 to 2.5.18 in /examples/sveltekit in the dependencies group (#1046) (ebab7de)
example: Bump ai from 3.1.36 to 3.1.37 in /examples/nextjs-14-openai in the dependencies group (#995) (b43827b)
example: Bump hono from 4.4.9 to 4.4.10 in /examples/nodejs-hono-rl in the dependencies group (#1048) (6e7c1fe)
example: Bump lucide-react from 0.396.0 to 0.399.0 in /examples/nextjs-14-authjs-5 in the dependencies group across 1 directory (#1040) (ea96487)
example: Bump lucide-react from 0.396.0 to 0.399.0 in /examples/nextjs-14-react-hook-form in the dependencies group across 1 directory (#1039) (334ff9e)
example: Bump postcss from 8.4.38 to 8.4.39 in /examples/nextjs-14-app-dir-rl in the dependencies group (#1051) (ac24a0b)
example: Bump postcss from 8.4.38 to 8.4.39 in /examples/nextjs-14-app-dir-validate-email in the dependencies group (#1045) (290bc49)
example: Bump postcss from 8.4.38 to 8.4.39 in /examples/nextjs-14-authjs-5 in the dependencies group (#1056) (e2343f0)
example: Bump postcss from 8.4.38 to 8.4.39 in /examples/nextjs-14-clerk-rl in the dependencies group (#1058) (422b320)
example: Bump postcss from 8.4.38 to 8.4.39 in /examples/nextjs-14-clerk-shield in the dependencies group (#1044) (b6b891f)
example: Bump postcss from 8.4.38 to 8.4.39 in /examples/nextjs-14-decorate in the dependencies group (#1049) (43523a5)
example: Bump postcss from 8.4.38 to 8.4.39 in /examples/nextjs-14-ip-details in the dependencies group (#1047) (1fe6a05)
example: Bump postcss from 8.4.38 to 8.4.39 in /examples/nextjs-14-nextauth-4 in the dependencies group (#1054) (caff3dc)
example: Bump postcss from 8.4.38 to 8.4.39 in /examples/nextjs-14-pages-wrap in the dependencies group (#1055) (90e04f5)
example: Bump postcss from 8.4.38 to 8.4.39 in /examples/nextjs-14-react-hook-form in the dependencies group (#1050) (21e1108)
example: Bump the dependencies group across 1 directory with 2 updates (#1006) (0578cb2)
example: Bump the dependencies group across 1 directory with 2 updates (#1019) (a15df12)
example: Bump the dependencies group across 1 directory with 6 updates (#1017) (fb43c78)
example: Bump the dependencies group across 1 directory with 7 updates (#1028) (a3693d0)
example: Bump the dependencies group across 1 directory with 7 updates (#1036) (4e2bfe9)
example: Bump the dependencies group in /examples/nextjs-14-openai with 2 updates (#1057) (5df2e47)
example: Bump the dependencies group in /examples/nextjs-14-react-hook-form with 2 updates (#996) (988dbf3)
example: Bump the dependencies group in /examples/nodejs-hono-rl with 2 updates (#1007) (c36b9f3)
Move generated protobuf to default buf file path (#1009) (6800a00)
Warn when IP is empty, even if we override it in development (#1000) (da14bcb), closes #987#216
FAQs
Arcjet platform-independent replacement for util.format
We found that @arcjet/sprintf demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 2 open source maintainers collaborating on the project.
Package last updated on 01 Jul 2024
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
The 2023 Python Developers Survey reveals key trends in packaging, web frameworks, and developer demographics, highlighting a shift toward innovative tools as the Python community diversifies and grows among less experienced developers.
GitHub is combatting a new spam campaign that exploits issues with links to malicious downloads, highlighting the need for better moderation tools to protect open-source maintainers' time and security.
uv, Python's new package manager, offers a faster and more efficient alternative to pip with features that simplify tooling, manage Python versions, and streamline development workflows.