Skip to content

floatdrop/pff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Specifier What it does Example Result
%s String pff('Hello %s', 'world') 'Hello world'
%d Floored number pff('My age is %d', 13.2) 'My age is 13'
%% Percent pff('100%%s cool!') '100%s cool!'

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

License

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

About

Minimal implementation of printf, which is really fast

Resources

License

Stars

Watchers

Forks

Packages

No packages published