[Pkg-javascript-commits] [node-dargs] 42/54: minor tweaks

Bastien Roucariès rouca at moszumanska.debian.org
Wed Sep 6 09:41:05 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-dargs.

commit 11b811fecdc1024b8f35fb2b066330a46a054667
Author: Sindre Sorhus <sindresorhus at gmail.com>
Date:   Thu Jan 7 20:06:00 2016 +0100

    minor tweaks
---
 .editorconfig | 2 +-
 index.js      | 2 +-
 readme.md     | 9 ++++-----
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/.editorconfig b/.editorconfig
index 86c8f59..8f9d77e 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -7,7 +7,7 @@ charset = utf-8
 trim_trailing_whitespace = true
 insert_final_newline = true
 
-[package.json]
+[{package.json,*.yml}]
 indent_style = space
 indent_size = 2
 
diff --git a/index.js b/index.js
index 5140408..deb3cfe 100644
--- a/index.js
+++ b/index.js
@@ -43,7 +43,7 @@ module.exports = function (input, opts) {
 
 		if (key === '_') {
 			if (!Array.isArray(val)) {
-				throw new TypeError('special key \'_\' expected to be an Array, found a(n) ' + (typeof val) + '.');
+				throw new TypeError('Expected key \'_\' to be an array, but found ' + (typeof val));
 			}
 
 			extraArgs = val;
diff --git a/readme.md b/readme.md
index a48521a..ea7ac26 100644
--- a/readme.md
+++ b/readme.md
@@ -18,7 +18,7 @@ $ npm install --save dargs
 const dargs = require('dargs');
 
 const input = {
-	_: ['some', 'option'],          // each value in '_' will be appended to the end of the generated argument list, imitating minimist
+	_: ['some', 'option'],          // values in '_' will be appended to the end of the generated argument list
 	foo: 'bar',
 	hello: true,                    // results in only the key being used
 	cake: false,                    // prepends `no-` before the key
@@ -89,11 +89,10 @@ console.log(dargs({
 
 ## API
 
-### dargs(input, options)
+### dargs(input, [options])
 
 #### input
 
-*Required*  
 Type: `object`
 
 Object to convert to command-line arguments.
@@ -122,10 +121,10 @@ Maps keys in `input` to an aliased name. Matching keys are converted to options
 
 ##### useEquals
 
-Type: `boolean`
+Type: `boolean`  
 Default: `true`
 
-Setting to `false` switches the separator in generated commands from an equals sign ("=") to a single space (" "). For example:
+Setting to `false` switches the separator in generated commands from an equals sign `=` to a single space ` `. For example:
 
 ```js
 console.log(dargs({foo: 'bar'}, {useEquals: false}));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-dargs.git



More information about the Pkg-javascript-commits mailing list