format-unicorn
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/format-unicorn package

1.1.1 • Public • Published

🌈 Format Unicorn

A string format function made and used by Stack Exchange on their various websites. * *

Usage

$ npm install format-unicorn
(...)
$ node
> require('format-unicorn') // this adds formatUnicorn to String.prototype
{}
> 'We are not in {place} anymore.'.formatUnicorn({ place: 'Kansas' })
'We are not in Kansas anymore.'
> let formatUnicorn = require('format-unicorn/safe') // 'safer' version if you don't wanna mess with String's prototype
undefined
> formatUnicorn('We are not in {place} anymore.', { place: 'Kansas' })
'We are not in Kansas anymore.'

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i format-unicorn

    Weekly Downloads

    18,465

    Version

    1.1.1

    License

    Fair

    Last publish

    Collaborators

    • talles