Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Apr 4, 2011
1 parent a8b770d commit e4df2e4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/asset
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ while (args.length) {

if (assets.length) {
assets = assets.map(normalize);
console.log();
var install = asset.install(assets, repo, options.dest);

install.on('unknown', function(asset){
Expand All @@ -132,6 +133,10 @@ if (assets.length) {
install.on('error', function(err){
abort(err.message);
});

process.on('exit', function(){
console.log();
});
} else {
abort('asset <name ...> required');
}
Expand Down
10 changes: 10 additions & 0 deletions lib/asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ exports.install = function(assets, repo, dest){
return installer;
};

/**
* Search `repo` for `query`, invoking `fn(name, entry)`
* per matching entry.
*
* @param {Object} repo
* @param {String} query
* @param {Function} fn
* @api public
*/

exports.search = function(repo, query, fn){
var names = Object.keys(repo)
, len = names.length
Expand Down

0 comments on commit e4df2e4

Please sign in to comment.