prefers-yarn Check whether the working directory prefers yarn over npm Installation npm install prefers-yarn Usage const prefersYarn = require('prefers-yarn') const useYarn = prefersYarn() // boolean if (useYarn) { // do stuff} License MIT (c) Cezar Augusto.