![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/dceprojects.corals.io/node_modules/import-local/ |
# import-local [](https://travis-ci.org/sindresorhus/import-local) > Let a globally installed package use a locally installed version of itself if available Useful for CLI tools that want to defer to the user's locally installed version when available, but still work if it's not installed locally. For example, [AVA](http://ava.li) and [XO](https://github.com/xojs/xo) uses this method. ## Install ``` $ npm install import-local ``` ## Usage ```js const importLocal = require('import-local'); if (importLocal(__filename)) { console.log('Using local version of this package'); } else { // Code for both global and local version here… } ``` ## License MIT © [Sindre Sorhus](https://sindresorhus.com)