format npm bundle size (scoped) npm

The format library contains a collection of formatting methods either written or collected to make my life easier. These methods are not validators, they all work under the assumption that the input is valid already.

Installation

npm install --save @danehansen/format

Usage

As a module:

import * as format from '@danehansen/format';

var zip = '902101234'
zip = format.zipCode(zip);

In your browser:

<script src='danehansen-format.min.js'></script>
<script>
  var format = window.danehansen.format;
  var zip = '902101234'
  zip = format.zipCode(zip);
</script>

Methods