0.1.4 • Published 10 years ago

yalookup v0.1.4

Weekly downloads
32
License
SEE LICENSE IN ./...
Repository
github
Last release
10 years ago

yalookup

NPM build status js-standard-style

yet another lookup! look for a file searching from the current or a given directory up.

motivation

very lean recursive implementation restricted to using only node's core modules.

  • no glob
  • only one option (cwd)
  • only synchronous
  • no cli

at least for now.

usage

example

search from __dirname upwards for package.json:

var lookup = require('yalookup')
var filepath = lookup('package.json', { cwd: __dirname })

signature

lookup(filename: string, options: object): string

  • filename string plain text name of the file, no support for glob
  • options object currently only supports a single option:
    • cwd string the directory to start searching upwards from, defaults to process.cwd()
  • return string the filepath of the file if found, null otherwise

status

stable

license

(C) Copyright 2015, bzb-stcnx, all rights reserved. MIT

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago