This package has been deprecated

Author message:

WARNING: This project has been renamed to @rimiti/stimmy. Install using new-package-name instead.

stimmy

1.2.2 • Public • Published

stimmy

Dependencies Dependencies Code Climate score Codecov Code Climate issue Node.js version NPM version Build Status Security version MIT License PRs Welcome

Description

This module provides a string variables replacer.

Install

$ npm install stimmy --save

Features

  • Can replace variables from an object.
  • Can replace variables from an array.

Documentation

Examples

From import

import stimmy from 'stimmy';

From require

const stimmy = require('stimmy');

From an array

  const str = stimmy('This {0} is {1}!', ['module', 'awesome']);
  // This module is awesome!
  const str = stimmy('{0}% of code coverage, it\'s {1}...', [100, 'so amazing']);
  // 100% of code coverage, it's so amazing...

From an object

  const str = stimmy('{timmy} My hobby is {hobby}...', {timmy: 'Timmmmmmmyy !!', hobby: 'running'});
  // Timmmmmmmyy !! My hobby is running...
  const str = stimmy('My name is {name}, I\'m {age}.', {name: 'stimmy', age: 25});
  // My name is stimmy, I'm 25.

Scripts

Run using npm run

Package Sidebar

Install

npm i stimmy

Weekly Downloads

2

Version

1.2.2

License

MIT

Unpacked Size

35.7 kB

Total Files

12

Last publish

Collaborators

  • rimiti