@ariabuckles/jsed
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -39,2 +39,3 @@ #!/usr/bin/env node | ||
if (!commander.string) { | ||
replacer = replacerArg; // Use js's built in $&, $1-$n etc. | ||
try { | ||
@@ -41,0 +42,0 @@ let replacerFunc = eval('(' + replacerArg + ')'); |
{ | ||
"name": "@ariabuckles/jsed", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "better sed, with js regexes & functions", | ||
@@ -5,0 +5,0 @@ "main": "jsed.js", |
# jsed | ||
better sed, with js regexes & functions | ||
Installation: `npm install -g jsed` | ||
Installation: `npm install -g @ariabuckles/jsed` | ||
@@ -19,1 +19,18 @@ Usage: | ||
``` | ||
Examples: | ||
``` | ||
> echo "use basic strings" | jsed "basic" "literal" | ||
use literal strings | ||
``` | ||
``` | ||
> echo "use regexes or funcs" | jsed '/\w+/g' "word=>'aaa'" | ||
aaa aaa aaa aaa | ||
``` | ||
``` | ||
> echo "use regexes without /s" | jsed '(regexes)' 'cool $1' | ||
use cool regexes without /s | ||
``` |
4295
60
36