A minimal string formatting utility that substitutes placeholders using shell-style `${propertyName}` syntax. Version 2.0.0 is the current stable release; no recent updates. It is a lightweight alternative to more feature-rich template libraries (e.g., sprintf-js, lodash.template) with no dependencies. Supports Node.js and browsers via CommonJS. Key differentiator: extreme simplicity—single function, no configuration, no tags or filters.
npm install fmtrNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage: require fmtr, define an object, call fmtr with a format string and the object, log result.
Ensure placeholders use exactly ${...} with a property name matching the object key.Flatten nested objects before passing to fmtr or use a different template library.
Ensure all referenced properties exist in the object to avoid unsubstituted placeholders.
Use `const fmtr = require('fmtr')` (CJS) or `import fmtr from 'fmtr'` (ESM, if bundler supports it).Add const fmtr = require('fmtr') at the top of the file.Use a regular string (single or double quotes) for the format argument, not a template literal.
No dependency data recorded yet.