Registry / testing / dataguise

dataguise

JSON →
library0.0.2jsnpmunverified

DataGuise is a simple data formatter for Node.js, version 0.0.2, used primarily for formatting numbers and text with custom mask patterns. It provides a single compile function that returns a formatter. The package is minimal, with no active development since 2015, and is suitable for basic masking tasks like currency formatting. It differentiates itself by its simplicity and use of reverse masking for values like decimals.

npm install dataguise
INSTALL
IMPORT
SIG · DATAGUISE
D
dataguise
testingjavascriptv0.0.2
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.

compile
const { compile } = require('dataguise');
import { compile } from 'dataguise';
Package is CommonJS only; ESM import will fail.
DataGuise
const DataGuise = require('dataguise');
import DataGuise from 'dataguise';
Default export is an object, not a function; use require or destructure compile.
version
const pkg = require('dataguise/package.json'); console.log(pkg.version);
const { version } = require('dataguise');
The package does not export version directly.

Formats a number as currency with dot thousands separator and comma decimal.

const { compile } = require('dataguise'); const toCurrency = compile('#.##0,00', { reverse: true }); const formatted = toCurrency(String(1234567.89)); console.log(formatted); // 1.234.567,89
Debug
Known issues
gotchaInput must be a string; numbers cause errors.
fix
Wrap numeric input with String() as shown in quickstart.
affects: >=0.0.1
deprecatedPackage not updated since v0.0.2 (2015).
fix
Consider alternatives like numbro or accounting for maintained solutions.
affects: 0.0.2
gotchaThe 'reverse' option may be confusing; it reverses mask processing.
fix
Set reverse: true for standard input to output direction.
affects: >=0.0.1
Errors
Common errors & fixes
TypeError: DataGuise is not a function
Trying to call require('dataguise')() directly
fix
Use const { compile } = require('dataguise'); then compile(mask, options)
TypeError: str.replace is not a function
Passing a number to the formatter instead of a string
fix
Convert number to string: toCurrency(String(value))
Upgrade
Version history
0.0.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
dataguise — npm install dataguise · libregistry