src/create/add-collection.js
function getCollection() {

    var config = {
        properties: {
            collection: {
                description: 'Collection name and number of rows, 5 if omitted (ex: posts 10): '.magenta,
                type: 'string',
                required: true
            }
        }
    };

    prompt.start();
    prompt.message = ' > ';
    prompt.delimiter = '';

    return new Promise(function(resolve, reject) {
        prompt.get(config, function(err, result) {
            if (err) return reject(err);
            return resolve(result.collection);
        });
    });
}
function getCollection() {

    var config = {
        properties: {
            collection: {
                description: 'Collection name and number of rows, 5 if omitted (ex: posts 10): '.magenta,
                type: 'string',
                required: true
            }
        }
    };

    prompt.start();
    prompt.message = ' > ';
    prompt.delimiter = '';

    return new Promise(function(resolve, reject) {
        prompt.get(config, function(err, result) {
            if (err) return reject(err);
            return resolve(result.collection);
        });
    });
}
function getCollection ( ) { var config = { properties : { collection : { description : 'Collection name and number of rows, 5 if omitted (ex: posts 10): ' . magenta , type : 'string' , required : true } } } ; prompt . start ( ) ; prompt . message = ' > ' ; prompt . delimiter = '' ; return new Promise ( function ( resolve , reject ) { prompt . get ( config , function ( err , result ) { if ( err ) return reject ( err ) ; return resolve ( result . collection ) ; } ) ; } ) ; }
Prompt for collection name.
@return {Promise}
Prompt for collection name .