prems

0.1.0 • Public • Published

prems

Hierarchical filepath resolver

Installation

$ npm install --save prems

Usage

const prems = require("prems");

prems(["./dir1", "./dir2"], "hello.txt", console.log);
// Log : "./dir1/hello.txt" if it exists
//       otherwise "./dir2/hello.txt" if it exists
//       or null if none of those files exists

// Promise style is also supported
prems(["./dir1", "./dir2"], "hello.txt").then(console.log));

License

The MIT License (MIT) - Copyright (c) 2016 Thomas Brouard

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    0

Package Sidebar

Install

npm i prems

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • brrd