UNPKG

cortex

Version:

Cortex is an npm-like package manager for browsers.

54 lines (42 loc) 968 B
'use strict'; exports.shorthands = { r: 'reverse' }; exports.options = { sort: { enumerable: true, type: String, info: "the results will be sorted by this field, default is 'name'" }, reverse: { enumerable: true, type: Boolean, info: 'whehter sorted in reverse order' }, terms: { enumerable: false, type: String, // command line type: String // programmatical type: Array.<string> info: 'the package to be unpublished.', set: function(terms) { var done = this.async(); if (terms) { terms = terms.split(','); } else { terms = []; } var remains = this.get('_'); if (remains.length) terms = terms.concat(remains); if (!terms.length) { return done("No terms provided"); } done(null, terms); } } }; exports.info = 'Search for packages from registry'; exports.usage = [ '{{name}} search [search term ...]' ];