1.0.0 • Published 9 years ago

pff v1.0.0

Weekly downloads
5,563
License
MIT
Repository
github
Last release
9 years ago

pff NPM version Build Status

Minimal printf implementation

No more words, show me the numbers!

image

Run yourself to get numbers relevant to your hardware:

$ npm i -g matcha printf sprint
$ npm i
$ matcha benchmark/index.js

Usage

var pff = require('pff');

console.log(pff('%s world from %d year!', 'Hello', 2014.7));
// Hello world from 2014 year!

Specifiers

SpecifierWhat it doesExampleResult
%sStringpff('Hello %s', 'world')'Hello world'
%dFloored numberpff('My age is %d', 13.2)'My age is 13'
%%Percentpff('100%%s cool!')'100%s cool!'

Not much, but hey! - it's fast!

License

MIT (c) 2014 Vsevolod Strukchinsky (floatdrop@gmail.com)