You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

simple-format

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-format

sprintf with multiple arguments

1.0.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

simple-format Build Status

Simple util.format replace that handles multiple arguments

Install

$ npm install --save simple-format

Usage

var format = require('simple-format')
format('unicorns', '&', 'rainbows')
//=> unicorns & rainbows
format('%s & %s', 'unicorns', 'rainbows')
//=> unicorns & rainbows

API

format(messages...) -> string

messages

Type: string (variadic)

Strings to format. Operates like util.format which powers console.log in Node. If the first message has replacement tokens (e.g. %s), later arguments will be used as replacements. Otherwise, all arguments will be joined with a space.

License

MIT © Ben Drucker

Keywords

sprintf

FAQs

Package last updated on 30 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts