Registry / analytics / plotset-formatter

plotset-formatter

JSON →
library1.2.158jsnpmunverified

A JavaScript utility library for parsing and formatting numbers and dates, designed for use with plotset. Version 1.2.158. Provides functions like parseNumber, numberFormatter, parseDateTime, and dateFormatter with customizable patterns. Automatically detects number radix characters and date formats. Lightweight, zero-dependency library for Node.js and browser. Suitable for data formatting in analytics dashboards.

npm install plotset-formatter
INSTALL
IMPORT
SIG · PLOTSET-FORMATTER
P
plotset-formatter
analyticsjavascriptv1.2.158
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.

getType
const { getType } = require('plotset-formatter');
import { getType } from 'plotset-formatter';
Package uses CommonJS; ESM import may not work without bundler support.
parseNumber
const { parseNumber } = require('plotset-formatter');
import { parseNumber } from 'plotset-formatter';
CommonJS only; default export not available.
dateFormatter
const { dateFormatter } = require('plotset-formatter');
import dateFormatter from 'plotset-formatter';
Named export only; no default export.

Demonstrates importing and using core parsing functions getType, parseNumber, and parseDateTime.

const { getType, parseNumber, parseDateTime } = require('plotset-formatter'); console.log(getType('123')); // 'string-number-date' console.log(parseNumber('100,000', ',', false)); // 100000 console.log(parseDateTime('Feb 13', false)); // ISO date string console.log(parseNumber('3,828.071', '.', true)); // 3828.071
Debug
Known issues
gotchaPackage is CommonJS only, not ESM. Using ESM import (import { ... } from 'plotset-formatter') will fail in Node.js without bundler or esm loader.
fix
Use require() or configure bundler to handle CommonJS.
affects: >=0.0.0
deprecatedNo named export for default; trying to import default (import plotsetFormatter from 'plotset-formatter') will result in undefined.
fix
Use destructuring from require(): const { ... } = require('plotset-formatter')
affects: >=1.0.0
gotchaparseNumber's forceMode parameter may cause unexpected results if not used carefully. Forcing radix character when incorrect can lead to NaN.
fix
Set forceMode to false unless you are certain of the radix character.
affects: >=0.0.0
breakingVersion 1.x may have different API signatures from earlier releases; check changelog for parseDateTime and dateFormatter parameter order.
fix
Update to latest version and verify parameter order per docs.
affects: <1.0.0
Errors
Common errors & fixes
TypeError: plotset_formatter.getType is not a function
Attempting to use ES module import with CommonJS package without bundler.
fix
Change 'import { getType } from "plotset-formatter"' to 'const { getType } = require("plotset-formatter")'.
Cannot find module 'plotset-formatter'
Package not installed or path incorrect.
fix
Run 'npm install plotset-formatter' and ensure import path is correct.
undefined
Trying to use default import: import plotsetFormatter from 'plotset-formatter' yields undefined.
fix
Use named destructuring: const { ... } = require('plotset-formatter')
Upgrade
Version history
1.2.158latest on npm
Audit
Dependencies

No dependency data recorded yet.

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