Detalhes do pacote

hike

nodeca12.1kMIT1.0.2

Multihome files search library for mincer

readme (leia-me)

hike

Build Status NPM version

Inspired by Hike (Ruby) - a library for finding files in a set of paths. It's only purpose is to simplify maintenance of mincer. No pull requests are accepted unless they are related to mincer needs.

See API docs for details on methods.

Examples

Find JavaScript files in this project:

trail = new Hike("/home/ixti/Projects/hike-js");
trail.appendExtensions([".js"]);
trail.appendPaths(["lib", "test"]);

trail.find("hike");
# => "/home/ixti/Projects/hike-js/lib/hike.js"

trail.find("test_hike");
# => "/home/ixti/Projects/hike-js/test/test_hike.rb"

Explore your shell path:

trail = new Hike("/");
trail.appendPaths(process.env.PATH.split(":"));

trail.find("ls");
# => "/bin/ls"

trail.find("gem");
# => "/home/ixti/.rvm/rubies/ruby-1.9.2-p290/bin/gem"

Installation

$ npm install hike

License

Copyright (c) 2014 Vitaly Puzrin, Aleksey V Zapparov

Released under the MIT license. See LICENSE for details.

changelog (log de mudanças)

1.0.2 / 2016-12-29

  • More strict properties check to avoid collisions withmodified prototypes, #13.

1.0.1 / 2014-12-12

  • Remove obsolete lodash dependency.
  • Set default root to '.' if nothing passed to constructor.

1.0.0 / 2014-12-01

  • Full rewrite. Removed all ruby-style madness.
  • We no longer support it as port. Library is now for internal mincer use only.

0.1.4 / 2014-07-26

  • Perfomance: don't create index for each uncached call.
  • Cache should keep results for missed files too.

0.1.3 / 2014-01-08

  • Maintenance release. Dependencies & lint rules update.

0.1.2 / 2013-06-16

  • Maintenance release. Replaced underscore with lodash, and different minor/cosmetic changes.

0.1.1 / 2012-10-13

  • Fix order of paths tried upon find loop.

0.1.0 / 2012-05-15

  • First release