react-native-create-library icon indicating copy to clipboard operation
react-native-create-library copied to clipboard

when there is no library's name with this cli, exception handling is needed

Open 738 opened this issue 7 years ago • 0 comments

Hello there

it is a kind of minor issue i think

when there is no library's name with this cli, exception handling is needed.

$ react-native-create-library
/Users/jonjee/.nvm/versions/node/v10.8.0/lib/node_modules/react-native-create-library/utils/isUpperCase.js:1
(function (exports, require, module, __filename, __dirname) { module.exports = (str, index) => str[index].toUpperCase() === str[index];
                                                                                                          ^

TypeError: Cannot read property 'toUpperCase' of undefined
    at module.exports (/Users/holykw/.nvm/versions/node/v10.8.0/lib/node_modules/react-native-create-library/utils/isUpperCase.js:1:107)
    at module.exports.name (/Users/holykw/.nvm/versions/node/v10.8.0/lib/node_modules/react-native-create-library/utils/hasPrefix.js:3:26)
    at module.exports (/Users/holykw/.nvm/versions/node/v10.8.0/lib/node_modules/react-native-create-library/lib.js:26:9)
    at Object.func (/Users/holykw/.nvm/versions/node/v10.8.0/lib/node_modules/react-native-create-library/command.js:19:5)
    at Command.runAction (/Users/holykw/.nvm/versions/node/v10.8.0/lib/node_modules/react-native-create-library/cli.js:15:13)
    at Command.listener (/Users/holykw/.nvm/versions/node/v10.8.0/lib/node_modules/react-native-create-library/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:182:13)
    at Command.parseArgs (/Users/holykw/.nvm/versions/node/v10.8.0/lib/node_modules/react-native-create-library/node_modules/commander/index.js:668:12)
    at Command.parse (/Users/holykw/.nvm/versions/node/v10.8.0/lib/node_modules/react-native-create-library/node_modules/commander/index.js:474:21)
    at Object.<anonymous> (/Users/holykw/.nvm/versions/node/v10.8.0/lib/node_modules/react-native-create-library/cli.js:27:9)

738 avatar Mar 11 '19 15:03 738