Skip to content

basic-examples/shell-expand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shell-expand

Expand shell-style variable substitution

Usage

Currently it works for flat input (1-depth) only and returns the result split by a given IFS string (defaults to " \t\n").

const vars = {
  TEST: '$TEST $TEST'
};
console.log(shellExpand('${TEST}', vars, { IFS: ' ' })); // ["$TEST", "$TEST"]

About

Expand shell-style variable substitution

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published