diff --git a/.eslintrc.json b/.eslintrc.json index af3e511..461c590 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -13,7 +13,7 @@ "no-extra-parens": "error", "strict": [ "error", "global" ], "quotes": [ "error", "double" ], - "indent": [ "error", 2, { "SwitchCase": 1 } ] + "indent": [ "error", 2, { "SwitchCase": 1, "flatTernaryExpressions": true } ] }, "overrides": [ { diff --git a/README.md b/README.md index 98babe0..4fb8221 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ commands, once installed, run `cowsayjs -h`, `cowthinkjs -h` or `moojs -h` to print the help. ```Text -moojs, cowsayjs, cowthinkjs v1.0.3 +moojs, cowsayjs, cowthinkjs v1.0.4 Copyright (c) 2021 Erick Rincones Licensed under the MIT License diff --git a/cli/index.js b/cli/index.js index 16a3a30..58b2a1e 100644 --- a/cli/index.js +++ b/cli/index.js @@ -78,7 +78,7 @@ function getArg(token, j, argv, i) { */ function printHelp() { // Version - var version = "1.0.3"; + var version = "1.0.4"; // Get current script var script = process.argv[1].replace(/\\/g, "/"); diff --git a/lib/index.js b/lib/index.js index 6d56fa1..e4147a3 100644 --- a/lib/index.js +++ b/lib/index.js @@ -129,13 +129,14 @@ function moo(message, options) { * Default values: * - eyes: "oo" * - wrap: 40 + * - action: "say" * * @param {string} [message] Message to say * @param {CowOptions} [options] Cow options * @returns ASCII cow saying the message */ function cowsay(message, options) { - return moo(message, options === undefined ? undefined : extendOptions(options, "action", "say")); + return moo(message, extendOptions(options, "action", "say")); } /** @@ -144,13 +145,14 @@ function cowsay(message, options) { * Default values: * - eyes: "oo" * - wrap: 40 + * - action: "think" * * @param {CowAllOptions | string} [message] Message to think * @param {CowOptions} [options] Cow options * @returns ASCII cow thinking the message */ function cowthink(message, options) { - return moo(message, options === undefined ? undefined : extendOptions(options, "action", "think")); + return moo(message, extendOptions(options, "action", "think")); } diff --git a/package-lock.json b/package-lock.json index a693f1b..8f1ca5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "cowsayjs", - "version": "1.0.3", + "version": "1.0.4", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "1.0.2", + "version": "1.0.4", "license": "MIT", "bin": { "cowsayjs": "cli/cowsay.js", diff --git a/package.json b/package.json index 47cc9a9..145e5ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cowsayjs", - "version": "1.0.3", + "version": "1.0.4", "description": "A nodejs clone of the classic cowsay and cowthink cli commands", "main": "lib/index.js", "scripts": {