var-expansion

Shell Parameter Expansion for node.js and browser.

Usage no npm install needed!

<script type="module">
  import varExpansion from 'https://cdn.skypack.dev/var-expansion';
</script>

README

var-expansion

Shell Parameter Expansion for node.js and browser.

Installation & Usage

Installation:

% npm install var-expansion

Usage:

var substiteVariables = require('var-expansion').substiteVariables;

var {value, error} = substiteVariables("Current path: $PWD", {env: process.env});

See tests for more usage examples.

Development

Cloning repository:

% git clone https://github.com/andreax79/var-expansion.git
% cd var-expansion

Make sure code typechecks and tests pass:

% make check
% make test
% make test-watch

Make a new release (this does all checks before bumping a version):

% make version-patch publish
% make version-minor publish
% make version-major publish