findUp

Type:Function
Status:beta
Since:1.0.0
Platform:node
@blackbyte.sugar.node.fs

This function simply walk across upper folders to search for a file and returns you the first finded

Params

  1. search*-IFindUpSearch

    The name of the file you search

  2. settings{}TFindUpSettings

    An object of settings to configure your research

Return

  1. -SFile|null

    An SFile instance or null if nothings founded

Example

import { findUp } from '@blackbyte/sugar/fs';
const file = await findUp('myCoolFile.json', {});
console.log(file.path);

Todo

  • testsnormal