https://github.com/andreax79/var-expansion
Shell Parameter Expansion for node.js and browser.
https://github.com/andreax79/var-expansion
Last synced: over 1 year ago
JSON representation
Shell Parameter Expansion for node.js and browser.
- Host: GitHub
- URL: https://github.com/andreax79/var-expansion
- Owner: andreax79
- Created: 2015-04-02T07:30:36.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2017-03-30T17:30:53.000Z (about 9 years ago)
- Last Synced: 2024-04-24T21:12:31.939Z (about 2 years ago)
- Language: JavaScript
- Size: 44.9 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# var-expansion
Shell Parameter Expansion for node.js and browser.
## Installation & Usage
Installation:
```
% npm install var-expansion
```
Usage:
``` js
var substiteVariables = require('var-expansion').substiteVariables;
var {value, error} = substiteVariables("Current path: $PWD", {env: process.env});
```
See [tests] for more usage examples.
[tests]: https://github.com/andreax79/var-expansion/blob/master/src/__tests__/index-test.js
## 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
```