export-lazy-prop
Export a lazily evaluated property.
Installation
npm install export-lazy-prop
Usages
// util/index.jsexportsfoo = ;exportsbar = ; // some.jsconst util = ;// foo.js and bar.js are loaded util;
In this case, even if bar.js
is not used, it will still be loaded from the file system.
With export-lazy-prop
, modules will be loaded on demand.
// util/index.jsconst exportLazyProp = ;;; // some.jsconst util = ;// will not load foo.js and bar.js util;// foo.js is loaded
Or
// util/index.jsconst exportLazyProp = ;;
Related
- define-lazy-prop - Define a lazily evaluated property on an object
- import-lazy - Import a module lazily
License
Copyright (c) 2019 dailyrandomphoto. Licensed under the MIT license.