Package Exports
- sprintfit
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (sprintfit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Sprintfit

Small sprintf and vsprintf format specifier focused on strings.
ℹ️ Notice: sprintf
and vsprintf
will treat their arguments as strings only. If you are looking for the full specification you could try sprintf.js or printj.
Install
yarn add sprintfit
npm install sprintfit
UMD file is also available on unpkg:
<script src="https://unpkg.com/sprintfit/sprintfit.umd.min.js"></script>
You can use the library via window.sprintfit
.
Usage
sprintf
Return a formatted string and accepts a variable number of arguments.
import { sprintf } from 'sprintfit'
sprintf('date: %s-%s-%s', 2018, 07, 25)
// date: 2018-07-25
vsprintf
Operates as sprintf()
but accepts an array of arguments.
import { vsprintf } from 'sprintfit'
vsprintf('date: %s-%s-%s', [2018, 07, 28])
// date: 2018-07-28
Contributions
Feel free to send some Pull request or issue.
License
MIT license
© 2018 José Luis Quintana