-
-
Save r4phf43l/dc5bf0805b287c41afffd5b131ddbdae to your computer and use it in GitHub Desktop.
Simple and minimal `sprintf` function in JavaScript.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sprintf = ( format, ...args ) => ( i = 0, format.replace( /%s/g, () => args[i++] ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment