transcend-formats

1.0.4 • Public • Published

transcend-formats

General formatting helper functions

Source

Source code can be found at js/transcend-formats.js

Installation

npm install transcend-formats

Use

const tf = require('transcend-formats')

// Format Dates
const date = new Date();
console.log(tf.dateFormatter(date));

// Format Duration 
const duration = 340230 // in ms
console.log(tf.durationFormatter(duration))

// Format Identity
const input = "test";
console.log(tf.identityFormatter(input))

// Format Image
const img = "/path/to/img.jpg"
console.log(tf.imageFormatter(img))

// Format Image
const row = {
    uri : 'https://music-file-location.com'
}
console.log(tf.imageLinkFormatter(img, row, (row) => row.uri))

Readme

Keywords

Package Sidebar

Install

npm i transcend-formats

Weekly Downloads

1

Version

1.0.4

License

MIT

Last publish

Collaborators

  • michaelfarrell76