UNPKG

587 BJavaScriptView Raw
1var instructions = require('../instructions');
2var question = require('../question');
3var checkAvailable = require('../check-available');
4
5module.exports = function(){
6 instructions('Naming Your Package', 'naming_packages');
7
8 return question('{underline}Challenge{/underline}: Find a name that isn\'t taken and modify your package.json (verify by not passing a command here)', function(data){
9 if(data[0]){
10 return false;
11 }
12
13 return checkAvailable()
14 .then(function(result){
15 return new RegExp('is not in the npm registry').test(result);
16 });
17 });
18};