Skip to content
This repository has been archived by the owner on Dec 12, 2017. It is now read-only.

stoeffel/format-string

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"`

About

Format a string, using values from an object.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages