Registry / productivity / inter-mediator-formatter

inter-mediator-formatter

JSON →
library1.1.0jsnpmunverified

String formatting utility extracted from INTER-Mediator core. Current stable version 1.1.0. Provides template-based string formatting with named placeholders, similar to Python's str.format. Lightweight with zero dependencies. Used internally within INTER-Mediator framework. No recent updates; minimal maintenance.

npm install inter-mediator-formatter
INSTALL
IMPORT
SIG · INTER-MEDIATOR-FOR
I
inter-mediator-formatter
productivityjavascriptv1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Formatter
import { Formatter } from 'inter-mediator-formatter'
import Formatter from 'inter-mediator-formatter'
Named export only. Default import is not available.
default
import * as fmt from 'inter-mediator-formatter'
const fmt = require('inter-mediator-formatter')
CommonJS require works but TypeScript users should use ESM imports.
Formatter
const { Formatter } = require('inter-mediator-formatter')
const Formatter = require('inter-mediator-formatter')
CommonJS destructuring is required because the module exports an object with Formatter property.

Basic example showing named placeholder substitution using string template.

import { Formatter } from 'inter-mediator-formatter'; const formatter = new Formatter(); const template = 'Hello {name}, you are {age} years old.'; const result = formatter.format(template, { name: 'Alice', age: 30 }); console.log(result); // "Hello Alice, you are 30 years old."
Debug
Known issues
gotchaPlaceholders must match keys exactly; no nested property support.
fix
Use flat objects only; do not pass nested objects.
affects: <=1.1.0
deprecatedThis package is deprecated within the INTER-Mediator ecosystem; use core's built-in formatting instead.
fix
Migrate to INTER-Mediator core's format method if using within framework.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: formatter.format is not a function
Default import used instead of named import.
fix
Use import { Formatter } from 'inter-mediator-formatter' and instantiate with new Formatter().
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
inter-mediator-formatter — npm install inter-mediator-formatter · libregistry