Skip to content

cyxou/format-util

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

Format Util

Lightweight util.format() for the browser.

Install

npm i format-util

Usage

var format = require('format-util')
  , msg = format('%s', 'foo');

Or with an array of values in the second argument just like with vsprintf:

var format = require('format-util')
  , msg = format('My name is %s, I drink %s!', ['Alex', 'vodka']);

Developer

Test

Run the test specifications:

npm test

Spec

Compile test specifications for the browser (open test/index.html):

npm run spec

Cover

Generate code coverage:

npm run cover

Browserify

Create a standalone browserify build:

npm run browserify

Clean

Remove generated files:

npm run clean

Docs

To generate all documentation:

npm run docs

Readme

Generate the project readme file mdp:

npm run readme

License

Everything is MIT. Read the license if you feel inclined.

Generated by mdp(1).

About

Lightweight util.format() for the browser

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 74.8%
  • HTML 25.2%