3.0.0 • Published 4 years ago

has-yarn v3.0.0

Weekly downloads
4,758,988
License
MIT
Repository
github
Last release
4 years ago

has-yarn

Check if a project is using Yarn

Useful for tools that needs to know whether to use yarn or npm to install dependencies.

It checks if a yarn.lock file is present in the working directory.

Install

$ npm install has-yarn

Usage

.
├── foo
│   └── package.json
└── bar
    ├── package.json
    └── yarn.lock
import hasYarn from 'has-yarn';

hasYarn('foo');
//=> false

hasYarn('bar');
//=> true

API

hasYarn(cwd?)

Returns a boolean of whether the project uses Yarn.

cwd

Type: string\ Default: process.cwd()

The current working directory.

Related

easy-select-rninit-log4brainsreact-native-bluetooth2ts-redux-store-templateairscanairscan-examplereact-native-esc-pos-sahaabeatpro-ssr@borisovart/atol-kkt-moduledeneme323112@ntt_app/react-native-custom-notificationdiscord-music-botsreact-native-covid-sdk@saeon/quick-formmysql-formatreact-native-printer-brothersreact-native-shekhar-bridge-testcogoportutilsdyx-react@oiti/documentoscopy-react-nativequoc-testluminos-ui-core@everything-registry/sub-chunk-1828jawwy-sdkjawwy_gamification_releasereact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgreact-native-jawwy_samplegriffin-ui-librarytape-rollertest-library-123test-haptik-libwodax-update-notifierwifi_configuration_packagewhatsconcstandard-ejectsubpackagetest-zeo-collectvision-camera-plugin-face-detectorvision-camera-plugin-scan-facesvision-camera-base64-resizedutquibusdamvantiq-reactvite_vue3_ts_ssssdddddyyyyjrennsoh88-react-native-scroll-indicatorjesh-calculationjohn-test-upgradejnf-accesscontrol-rnttljordy-frijters-test-libinstall-iskhaled-salem-custom-componentshw9has-lockfilehookemhong1-utilshexagon-cliharumerrorhas-yarn-climama-exporterm2m-chartjs-plugin-crosshairkorn@wecraftapps/react-native-use-keyboard@tsed/monorepo-utils@tlgeo/react-native-gdal@thinxviewx/core-rn@types/has-yarn@tonysusi/vapid@therealklanni/has-yarn-cli@viewstools/morph@viewstools/use@vandai-nguyen/module_test@xiwen5566/aqara-automation-switch@yiminghe/update-notifier@yplabs-ltd/react-native-detector@zalastax/nolb-has-@zeplin/cli@tensei/cli@zotasys/nativeagent-get-agentbabel-upgradeawesome-module-kdanything-config-fiskerarchlibraryarvm-bestdeveloper@oiti/rn-liveness2d@pattern-lab/cli@nissix/public-plugins@node-sitecore/cli@pika/publish@ponchodien/react-native-printer-imin@orschweitzer/git-clone-package@pliny/cligenz-native-elementsgflowframework_test_library_sixdeeframework_test_library_sixdee_newframework_test_library_sixdee_new_newgenerator-goy
3.0.0

4 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.0.0

9 years ago