String substitution according to the given format
Simplified speed-oriented JavaScript equivalent of the C/PHP sprintf
function.
Installation
npm install cjs-format
Usage
Add to the scope:
var format = ;
Simple replacement:
// This is a catconsole;
Multiple replacement:
// This is a cat and a dogconsole;
Replacement with changed order:
// This is a cat and a dog and another catconsole;
Development mode
There is a global var
DEVELOP
which activates additional consistency checks and protection logic not available in release mode.
Contribution
If you have any problems or suggestions please open an issue according to the contribution rules.
License
cjs-format
is released under the MIT License.