
Research
Node.js Fixes AsyncLocalStorage Crash Bug That Could Take Down Production Servers
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.
string-object-formatter
Advanced tools
Inspired by python named formatter function, replace text inside a string based on object properties names and values.
In a CommonJS environment
const Formatter = require('string-object-formatter');
Using import
import Formatter from '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 = 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'
+ new default(startDelimiter?: string, endDelimiter?: string): default
Creates an instance of Formatter.
memberof Formatter
| Name | Type | Default value |
|---|---|---|
startDelimiter | string | '{' |
endDelimiter | string | '}' |
Returns: default
Defined in: index.ts:12
• endDelimiter: string
Defined in: index.ts:12
• startDelimiter: string
Defined in: index.ts:11
▸ format(stringToFormat: string, formatItems: FormatObject): string
Formats string according to object
memberof Formatter
| Name | Type | Description |
|---|---|---|
stringToFormat | string | The string to format |
formatItems | FormatObject | Ex.: {'toReplace': 'replaced'} turns 'example_{toReplace}' to 'example_replaced' |
Returns: string
The replaced string
Defined in: index.ts:36
FAQs
Python inspired named template formatter for Javascript strings
The npm package string-object-formatter receives a total of 314 weekly downloads. As such, string-object-formatter popularity was classified as not popular.
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.

Research
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.