1.0.6 • Published 7 years ago

strike-util v1.0.6

Weekly downloads
4
License
ISC
Repository
github
Last release
7 years ago

strike-util

printf

strike-util implements C-style printf here are some examples.

import {printf} from 'strike-util'; 

console.log(printf('This %s tastes perfect','orange'));  //logs This orange tastes perfect 

console.log(printf('The typeof %d is a %typeof',12,12)); //logs The typeof 12 is a number 

var o = {
    name:{
        firstName:"Suhail",
        lastName:"Abood"
    },
    toJSON:function(){
        return {
            firstName:this.name.firstName,
            lastName:this.name.lastName
        };
    }
}

console.log(printf('This object can be jsonified %o',o)); //logs This object can be jsonified {"firstName":"Suhail","lastName":"Abood"}
1.0.6

7 years ago

1.0.5

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago