Skip to content
This repository has been archived by the owner on Oct 20, 2021. It is now read-only.
/ prems Public archive

Hierarchical filepath resolver for node

License

Notifications You must be signed in to change notification settings

brrd/prems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prems

Hierarchical filepath resolver

⚠️ This module is deprecated

Use this alternative instead: https://github.com/sindresorhus/locate-path

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

About

Hierarchical filepath resolver for node

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published