Skip to content

Commit

Permalink
feat(exposed): adds trim
Browse files Browse the repository at this point in the history
  • Loading branch information
rafamel committed Apr 22, 2019
1 parent a65f650 commit 164e7eb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@
"loglevel": "^1.6.1",
"promist": "^0.5.3",
"slimconf": "^0.9.0",
"spawn-command": "0.0.2-1"
"spawn-command": "0.0.2-1",
"string-argv": "^0.3.0"
},
"husky": {
"hooks": {
Expand Down
1 change: 1 addition & 0 deletions src/exposed/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default as options } from './options';
export { default as trim } from './trim';
7 changes: 7 additions & 0 deletions src/exposed/trim.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import argv from 'string-argv';

export default function trim(str: string): string {
return argv(str)
.map((x) => x.trim())
.join(' ');
}

0 comments on commit 164e7eb

Please sign in to comment.