expandenv

1.0.0 • Public • Published

#expandenv

Environment Variable injection for your strings

##Installation

npm install --save expandenv

##Usage

Expandenv takes a string and injects the environment variable for each $KEYWORD it finds. If none is available it will leave the $KEYWORD. It also allows you to pass in a hash that will override the process.env variables you specify.

var expandenv = require('expandenv')
  , dir = expandenv("$PWD") // "/the/current/directory/"
  , example = expandenv("Hi $PARENT how are you?", {PARENT: 'Mom'}) // "Hi Mom how are you?"

Made with ⚡️ by @taterbase

Package Sidebar

Install

npm i expandenv

Weekly Downloads

27

Version

1.0.0

License

MIT

Last publish

Collaborators

  • taterbase