@quid/schema-formatter

1.1.1 • Public • Published

schema-formatter

This package contains a schema driven value formatter.

Installation

yarn add @quid-private/schema-formatter

Usage

const Formatter = require('@quid-private/schema-formatter');

const schema = ...;
const formatter = new Formatter(schema);
const schemaProperties = formatter.getProperties();

// Assuming 'propA' and 'propB' are defined
// by the schema and both have a 'template'
schemaProperties.propA.format(1000); // '1K'
schemaProperties.propB.format('foo'); // 'FOO'

Readme

Keywords

none

Package Sidebar

Install

npm i @quid/schema-formatter

Weekly Downloads

1

Version

1.1.1

License

ISC

Unpacked Size

36 kB

Total Files

14

Last publish

Collaborators

  • quidops