ryanzec / name-that-color

A command line utility that uses the library that the name that color project (http://chir.ag/projects/ntc/) uses that also provides additional functionality
MIT License
50 stars 12 forks source link

Displays stack traces if an invalid color was entered #1

Open jantimon opened 8 years ago

jantimon commented 8 years ago

name-that-color "#12345"

versions/4.2.2/lib/node_modules/name-that-color/lib/index.js:6
console.log(chalk.magenta(process.argv[2]) + ' name is ' + chalk.cyan(ntc.name(oneColor(process.argv[2]).hex())[1]));
                                                                                                      ^
TypeError: oneColor(...).hex is not a function
    at Object.<anonymous> (versions/4.2.2/lib/node_modules/name-that-color/lib/index.js:6:106)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:467:10)
    at startup (node.js:136:18)
    at node.js:963:3
jantimon commented 8 years ago

Oh never mind I forgot the last digit