Registry / devops / btrz-formatter

btrz-formatter

JSON →
library1.4.0jsnpmunverified

A formatter library by Betterez, version 1.4.0. It provides simple string and number formatting utilities. The library is lightweight with no external dependencies, but lacks active maintenance and detailed documentation. It is primarily used internally by Betterez and may not be suitable for broader use.

npm install btrz-formatter
INSTALL
IMPORT
SIG · BTRZ-FORMATTER
B
btrz-formatter
devopsjavascriptv1.4.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 'btrz-formatter'
const Formatter = require('btrz-formatter')
The package exports a Formatter class as a named export. CommonJS require works but is not typical for this package.
formatMoney
import { formatMoney } from 'btrz-formatter'
import formatMoney from 'btrz-formatter'
formatMoney is a named export, not a default export.
packaging
import { packaging } from 'btrz-formatter'
import { Packaging } from 'btrz-formatter'
Case-sensitive: export is lowercase 'packaging'.

Demonstrates basic usage: create a Formatter instance and format a monetary amount.

import { Formatter, formatMoney } from 'btrz-formatter'; const formatter = new Formatter(); const result = formatMoney(1234.56, 'USD'); console.log(result); // '$1,234.56'
Debug
Known issues
deprecatedThe package is in maintenance mode and may not receive updates.
fix
Consider migrating to a more actively maintained formatter library like 'accounting' or 'numeral'.
affects: >=1.0.0
gotchaImporting with require may cause type issues in TypeScript.
fix
Use ES module import syntax for proper type inference.
affects: >=1.4.0
gotchaThe export names are not documented; case sensitivity matters.
fix
Check the actual source code for export names.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: formatter.formatMoney is not a function
Importing formatMoney as a method on Formatter instance instead of standalone function.
fix
Use formatMoney directly: import { formatMoney } from 'btrz-formatter'; formatMoney(value, currency);
Cannot find module 'btrz-formatter'
Package not installed or not found in node_modules.
fix
Run npm install btrz-formatter
Module '"btrz-formatter"' has no exported member 'Format'.
Attempting to import a non-existent export named 'Format' (should be 'Formatter').
fix
Use 'Formatter' instead: import { Formatter } from 'btrz-formatter';
Upgrade
Version history
1.4.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
btrz-formatter — npm install btrz-formatter · libregistry