rasper
Advanced tools
Comparing version 0.2.5 to 0.2.6
@@ -47,3 +47,3 @@ module.exports = (args = process.argv.slice(1)) => { | ||
function removeDashs (value) { | ||
return value.replace(/-/g, '') | ||
return value.match(/[^-].*/)[0] | ||
} | ||
@@ -55,4 +55,8 @@ | ||
function kebabToCamel (value) { | ||
return value.replace(/-([a-z])/g, (_, k) => k.toUpperCase()) | ||
} | ||
function setValue (value) { | ||
const key = parser(value.split('=')[0]) | ||
const key = parser(kebabToCamel(value.split('=')[0])) | ||
const val = parser(value.split('=')[1]) | ||
@@ -59,0 +63,0 @@ |
{ | ||
"name": "rasper", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "Node.js parse argument options make ease.", | ||
@@ -55,3 +55,3 @@ "homepage": "https://cjpatoilo.com/rasper", | ||
"scripts": { | ||
"prepush": "marshmallow -o docs -i artwork.psd -t Rasper -d 'Node.js parse argument options make ease.' -f -m && boeing docs && rimraf docs", | ||
"prepush": "marshmallow -o docs -i artwork.psd -t Rasper -f -m && boeing docs && rimraf docs", | ||
"precommit": "npm t", | ||
@@ -58,0 +58,0 @@ "test": "nyc ava && eslint . -c styled --ignore-path .gitignore && editorconfig-tools check ." |
@@ -8,3 +8,3 @@ const test = require('ava') | ||
const argv = rasper( | ||
'pwa-installer dist/**/*.html -f 3 -n -o 4 foo bar baz --manifest --config=pwa.config.js 2 4 -f=99' | ||
'pwa-installer dist/**/*.html -f 3 -n -o 4 foo bar baz --manifest --config=pwa.config.js 2 4 -f=99 -l apache-2.0 --no-readme' | ||
.split(' ') | ||
@@ -19,3 +19,5 @@ .slice(1) | ||
config: 'pwa.config.js', | ||
f: 99 | ||
f: 99, | ||
l: 'apache-2.0', | ||
noReadme: true | ||
} | ||
@@ -22,0 +24,0 @@ |
109045
90