C like sscanf for Node.js.
Format support now
%d
- integer%f
- float%s
- string%S
- string of line%x
- hex%o
- octal
Return
Directly return
var sscanf = ; var number = ; console; // 2015
Array return
var scanf = ; var result = ; console; // [ 'Alan', 24, 180 ]
Json return
var scanf = ; var result = ; console;/* { integer: 12, float: 3.1415926, string: 'hello', hex: 31, octal: 8 }*/
License
MIT