Customizable String Formatter is a lightweight library for replacing variables in strings with custom value formatting. Version 1.2.1 supports Node.js 18+ and all modern browsers. It features a flexible variable syntax including nested properties, filter pipelines, and filter arguments. The library is ESM-only, ships TypeScript definitions, and emphasizes performance with fast value resolution. Key differentiators include support for multiple variable syntaxes (${}, $(), $<>), chained filters with arguments, and custom formatter/filter interfaces.
npm install custom-string-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create a custom formatter and use it to replace variables in a string with values from an object.
Use dynamic import() or switch to ESM (type: 'module' in package.json)
Ensure matching pairs: ${...}, $(...), or $<...>Use JSON object as argument if complex filtering is needed
Use dynamic import: import('custom-string-formatter') or enable ESM in your projectUse named import: import { createFormatter } from 'custom-string-formatter'Run: npm install custom-string-formatter