ja-greetings
Advanced tools
Comparing version 1.1.2 to 1.2.0
16
cli.js
@@ -33,6 +33,10 @@ #!/usr/bin/env node | ||
+ ' asterisk *\n' | ||
+ ' w-tri top: ▽ , bottom: △\n' | ||
+ ' b-tri top: ▼ , bottom: ▲\n' | ||
+ ' slash top: / ̄, bottom: _/\n' | ||
) | ||
.locale('en') | ||
const argv = yargs.argv | ||
const argv = yargs.argv | ||
const is_exist = exist_check(argv) | ||
let key = convert(argv._[0]) | ||
@@ -47,2 +51,5 @@ | ||
} | ||
else if (is_exist == false) { | ||
show_help() | ||
} | ||
else { | ||
@@ -54,5 +61,3 @@ switch (key) { | ||
default: | ||
const ret = exist_check(argv) | ||
if (ret == false) show_help() | ||
else greet(key) | ||
greet(key) | ||
break | ||
@@ -71,3 +76,4 @@ } | ||
let greet = '' | ||
module.list().forEach((item) => { | ||
module.get_greetings().forEach((item) => { | ||
if (item === 'all') return | ||
greet = module.greet(item, argv) | ||
@@ -74,0 +80,0 @@ if (greet) console.log(greet) |
@@ -27,2 +27,8 @@ module.exports = (text, opt) => { | ||
break | ||
case 'w-tri': | ||
return new Array(Math.floor(length/2) + 3).join('▽ ') + '\n' | ||
break | ||
case 'b-tri': | ||
return new Array(Math.floor(length/2) + 3).join('▼ ') + '\n' | ||
break | ||
default: | ||
@@ -51,2 +57,8 @@ return new Array(length + 3).join('-') + '\n' | ||
break | ||
case 'w-tri': | ||
return '\n' + new Array(Math.floor(length/2) + 3).join('△ ') | ||
break | ||
case 'b-tri': | ||
return '\n' + new Array(Math.floor(length/2) + 3).join('▲ ') | ||
break | ||
default: | ||
@@ -53,0 +65,0 @@ return '\n' + new Array(length + 3).join('-') |
@@ -34,3 +34,4 @@ const path = require('path') | ||
'winter', | ||
'last' | ||
'last', | ||
'all' | ||
] | ||
@@ -59,2 +60,4 @@ | ||
'b-star', | ||
'w-tri', | ||
'b-tri', | ||
'asterisk', | ||
@@ -61,0 +64,0 @@ 'slash' |
{ | ||
"name": "ja-greetings", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"description": "'ja-greetings' is a cli tool that displays Japanese greetings", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -83,2 +83,4 @@ [![npm version](https://badge.fury.io/js/ja-greetings.svg)](https://badge.fury.io/js/ja-greetings) | ||
asterisk * | ||
w-tri top: ▽ , bottom: △ | ||
b-tri top: ▼ , bottom: ▲ | ||
slash top: / ̄, bottom: _/ | ||
@@ -85,0 +87,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13121
243
94