Actualizacion maquina principal
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / import-fresh / readme.md
1 # import-fresh [![Build Status](https://travis-ci.org/sindresorhus/import-fresh.svg?branch=master)](https://travis-ci.org/sindresorhus/import-fresh)
2
3 > Import a module while bypassing the [cache](https://nodejs.org/api/modules.html#modules_caching)
4
5 Useful for testing purposes when you need to freshly import a module.
6
7
8 ## Install
9
10 ```
11 $ npm install import-fresh
12 ```
13
14
15 ## Usage
16
17 ```js
18 // foo.js
19 let i = 0;
20 module.exports = () => ++i;
21 ```
22
23 ```js
24 const importFresh = require('import-fresh');
25
26 require('./foo')();
27 //=> 1
28
29 require('./foo')();
30 //=> 2
31
32 importFresh('./foo')();
33 //=> 1
34
35 importFresh('./foo')();
36 //=> 1
37 ```
38
39
40 ## import-fresh for enterprise
41
42 Available as part of the Tidelift Subscription.
43
44 The maintainers of import-fresh and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-import-fresh?utm_source=npm-import-fresh&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
45
46
47 ## Related
48
49 - [clear-module](https://github.com/sindresorhus/clear-module) - Clear a module from the import cache
50 - [import-from](https://github.com/sindresorhus/import-from) - Import a module from a given path
51 - [import-cwd](https://github.com/sindresorhus/import-cwd) - Import a module from the current working directory
52 - [import-lazy](https://github.com/sindresorhus/import-lazy) - Import modules lazily