Skip to content

Latest commit

 

History

History
60 lines (43 loc) · 1.37 KB

README.md

File metadata and controls

60 lines (43 loc) · 1.37 KB

Locutus.sprintf

npm version

Find our package on NPM at: https://www.npmjs.com/package/locutus.sprintf

Locutus's version of sprintf and vsprintf in an NPM package

More info at: https://locutus.io/php/strings/sprintf/

This project is a fork of https://github.com/locutusjs/locutus and @code-lts will do it's best to keep this up to date.

Install

You can use the locutus package is you only want the Node version

npm install locutus.sprintf

or

yarn add locutus.sprintf

Use for Node

var sprintf = require('locutus/php/strings/sprintf')
var effectiveness = 'futile'
console.log(sprintf('Resistance is %s', effectiveness))

Use for a browser

<script type="text/javascript" src="vendor/js/locutus.sprintf/sprintf.js"></script>
var effectiveness = 'futile'
console.log(sprintf('Resistance is %s', effectiveness))

Package tree

.
├── LICENSE
├── package.json
├── README.md
└── src
    └── php
        ├── index.js
        └── strings
            ├── sprintf.browser.js
            ├── sprintf.js
            ├── vsprintf.browser.js
            └── vsprintf.js

3 directories, 8 files