Back to Explore

alexei/sprintf.js

GitHub
1 watchersOpen source

Last release:

sprintf-js is a complete open source JavaScript sprintf implementation for the browser and Node.js. It provides `sprintf` and `vsprintf` to format strings using `%` placeholders with options like padding, alignment, precision, and multiple type specifiers, including support for argument swapping, named arguments, and AngularJS use.

Project status

  • The repo looks quiet rather than actively maintained, with the last upstream push on 2024-04-05 and the latest documented published update being 1.1.3 on 2023-09-11, which is roughly 2 years ago relative to 2026-06-09.
  • Update cadence appears irregular and infrequent, with major changes clustered in 2017 to 2018 and then a long gap before a late 2023 metadata-focused update. There is no evidence here of ongoing, frequent updates since 2024.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • 1.1.3

    Release 1.1.3 has no publisher-provided release notes. The diff mainly updates version and license metadata (CHANGELOG/README/bower and dist file headers) and changes npm packaging configuration, with a large package-lock update.

  • 1.1.2

    No release notes were provided for version 1.1.2. However, the code diff shows a refactor of the sprintf core formatting logic (especially named argument parsing and property access), along with build/test and dependency updates.

  • 1.1.1

    Version 1.1.1 includes a substantial internal refactor of the sprintf implementation, plus build and tooling updates (JSHint to ESLint). The runtime formatting logic was also adjusted, specifically for the %g, %o, %x, and %X specifiers, and test expectations were updated accordingly.

  • 1.1.0

    Release 1.1.0 includes a substantial rewrite/refactor of the core sprintf implementation (src/sprintf.js) and adds AngularJS integration (src/angular-sprintf.js) plus new build/test tooling. The provided release notes are empty, so changes described by README or implied by code behavior are not formally documented in the release itself.

    BreakingFeatures
  • 1.0.3

    Version 1.0.3 introduces new sprintf format type specifiers, mainly `%j` (JSON encoding) and `%g` (floating point with significant-digit precision). The code changes are concentrated in `src/sprintf.js`, along with updates to README and added unit tests for these new specifiers.

    BreakingFeatures
  • 1.0.2

    Release 1.0.2 contains no published release notes. The only changes present in the code diff are version bumps in the packaging metadata files (bower.json and package.json).

  • 1.0.1

    Release 1.0.1 introduces an AngularJS integration layer (sprintf filters) and extends the core sprintf implementation. The core formatter is also modified in its placeholder handling and padding/sign logic, and the project build configuration is updated to emit an additional minified Angular artifact.

    Features
  • 1.0.0

    No release notes were provided for v1.0.0 (publisher says none). The diff shows both project packaging/build additions (npm metadata, grunt, dist artifacts, tests) and substantive behavioral changes inside the sprintf implementation. The most important functional changes are added support for computed values (invoking function arguments), relaxed numeric argument validation, and modified error-throwing behavior.

    BreakingFeatures
  • v0.7

    v0.7-beta1 refactors the sprintf implementation in src/sprintf.js. The code adds vsprintf and support for named placeholders, introduces a format parsing cache, and tightens validation around argument types.

  • v0.6

    Version v0.6 updates src/sprintf.js with small formatting/code style changes and, more importantly, alters the numeric sign handling logic used by sprintf for several format specifiers. The release notes section is empty, so the behavioral impact must be inferred from the code diff.

    Breaking
  • v0.5

    The release notes for v0.5 were not provided by the publisher (release notes field is empty). As a result, there is no documented information about new features, bug fixes, breaking changes, or security updates in this release.

  • v0.4

    Release v0.4 contains essentially no publisher-provided release notes. The only code change is a small logic modification in src/sprintf.js that affects how sprintf() computes padding width.

  • v0.3

    This release (v0.3) modifies a single file, src/sprintf.js, with only two lines changed. There are no publisher release notes provided, so the only observable changes come from the code diff.

  • v0.2

    Release v0.2 was published on 2013-04-02, but no release notes were provided by the publisher. As a result, this analysis cannot confirm whether there were new features, breaking changes, bug fixes, security updates, or dependency changes.