Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 10, 2024 via pnpm

extsprintf 1.3.0

extended POSIX-style sprintf
Package summary
Share
0
issues
1
license
1
MIT
Package created
18 Apr 2012
Version published
7 Mar 2015
Maintainers
10
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
extsprintf@1.3.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of extsprintf 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does extsprintf do?

"extsprintf" is a JavaScript package available on npm that presents a stripped-down version of s[n]printf(3c), adopting an extended POSIX-style sprintf function. In order to prevent the breakdown of existing programs, it provides a best-effort throw of an exception when confronted with an unrecognized format string, as opposed to simple ignorance. Its current feature set includes field alignment, zero padding, the forced display of numeric signs, field width, conversions for strings, decimal integers, and floats. The package also accepts but ignores argument size specifiers, given JavaScript's lack of acknowledgement for the physical size of an argument. Moreover, "extsprintf" supports the pretty-printing of JSON objects with %j and Error Objects with %r.

How do you use extsprintf?

To use "extsprintf", you first need to install it through npm with npm install extsprintf. After installation, a typical usage of the package is as follows:

var mod_extsprintf = require('extsprintf');
console.log(mod_extsprintf.sprintf('hello %25s', 'world'));

In the code snippet above, the sprintf function is used to format a string, inserting the string 'world' into the format placeholder %25s. The output will be 'hello' followed by a number of spaces and then 'world'.

Additionally, "extsprintf" supports printf and fprintf, with the former taking the same arguments as sprintf and printing the result to stdout, while the latter requires a Node stream as the first argument followed by the arguments of sprintf, printing the results to the provided stream.

Where are the extsprintf docs?

For detailed instructions, usage examples, and further information about the extsprintf package, you can visit the GitHub page at https://github.com/davepacheco/node-extsprintf. The repository's README file provides a meaningful overview for users and developers alike. As of now, there doesn't appear to be any standalone documentation aside from the README included on the GitHub project page.