A Python-inspired named template formatter for JavaScript strings. Current stable version is 4.0.1, with infrequent releases. It allows replacing placeholders in strings using object properties, supporting default `{}` delimiters or custom delimiters. The class-based API supports optional silent mode to suppress errors for missing keys. Ships TypeScript types. Differentiator: simple, lightweight, no dependencies, and supports custom delimiters, unlike similar libraries that may only support default syntax.
npm install string-object-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: instantiate Formatter and call format() with a template string and object.
Use default import: import Formatter from 'string-object-formatter'
Use new Formatter('{{', '}}') instead of passing an object.Explicitly set silent: true only if you want to ignore missing keys; otherwise omit or set false.
Use 'import Formatter from "string-object-formatter"'
Use 'const Formatter = require("string-object-formatter")'No dependency data recorded yet.