https://github.com/suhdev/strike-util
A set of utility classes for building web applications.
https://github.com/suhdev/strike-util
Last synced: about 1 year ago
JSON representation
A set of utility classes for building web applications.
- Host: GitHub
- URL: https://github.com/suhdev/strike-util
- Owner: suhdev
- Created: 2016-12-21T13:06:34.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-08T23:40:36.000Z (over 9 years ago)
- Last Synced: 2025-03-11T03:50:02.707Z (over 1 year ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# strike-util
## printf
`strike-util` implements C-style printf here are some examples.
```javascript
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"}
```