Skip to content

Replacements for has-yarn ​

empathic ​

empathic provides a generic way to find files, including searching upwards through parent directories.

Example:

ts
import hasYarn from 'has-yarn'
import * as find from 'empathic/find'

hasYarn() 
Boolean(find.up('yarn.lock')) 

Like has-yarn, find.up walks up parent directories and accepts a starting directory:

ts
Boolean(find.up('yarn.lock', { cwd }))

Released under the MIT License. (13757e3d)