Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    format-stringpublic

    format-string

    Format a string, using values from an object.

    Installation

    npm install format-string

    Usage

      var formatString = require('format-string');
     
      var user = {
        name: 'Stoeffel',
        modified: new Date()
      };
      formatString('Hello, :name (:modified)', user); // => Hello, Stoeffel (31.12.2014)

    CLI

      $ format-string 'Hello, :name (:modified)' --name stoeffel --modified `date +"%m.%d.%y"`

    install

    npm i format-string

    Downloadsweekly downloads

    184

    version

    1.0.0

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar