
Security News
Inside Lodash’s Security Reset and Maintenance Reboot
Lodash 4.17.23 marks a security reset, with maintainers rebuilding governance and infrastructure to support long-term, sustainable maintenance.
string-object-formatter
Advanced tools
Inspired by python named formatter function, replace text inside a string based on object properties names and values.
const Formatter = require('string-object-formatter');
const formatter = new Formatter();
const toFormat = 'My name is {firstName} {lastName}';
const formatted = formatter.format(toFormat, {firstName: 'John', lastName: 'Doe'});
// formatted is 'My name is John Doe'
const Formatter = require('string-object-formatter');
const formatter = new Formatter('{{', '}}');
const toFormat = 'My name is {{firstName}} {{lastName}}';
const formatted = formatter.format(toFormat, {firstName: 'John', lastName: 'Doe'});
// formatted is 'My name is John Doe'
Kind: global class
stringFormatter Class
stringFormats string according to object
Kind: instance method of Formatter
| Param | Type | Description |
|---|---|---|
| stringToFormat | string | |
| formatItems | object | Ex.: {'toReplace': 'replaced'} turns 'example_{toReplace}' to 'example_replaced' |
Kind: static class of Formatter
Creates an instance of Formatter.
| Param | Type | Default |
|---|---|---|
| [startDelimiter] | string | "'{'" |
| [endDelimiter] | string | "'}'" |
FAQs
Python inspired named template formatter for Javascript strings
We found that string-object-formatter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Lodash 4.17.23 marks a security reset, with maintainers rebuilding governance and infrastructure to support long-term, sustainable maintenance.

Security News
n8n led JavaScript Rising Stars 2025 by a wide margin, with workflow platforms seeing the largest growth across categories.

Security News
The U.S. government is rolling back software supply chain mandates, shifting from mandatory SBOMs and attestations to a risk-based approach.