@salesforce/lazy-require
Lazily load npm packages
Last updated 15 days ago by jgrantham .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @salesforce/lazy-require 
SYNC missed versions from official npm registry.

@salesforce/lazy-require

A Node library for lazily loading commonjs modules in order to speed up application execution time.

Note that not all modules are well-suited for lazy loading -- some modules expect to run essential initialization code in addition to exporting types when loaded (BAD!). Modules that do this should not be lazily loaded, or undefined results are likely to occur in your application. Use with care (that is, make sure your app is well tested before using this in production).

Usage

TypeScript

JavaScript

// Enable lazy loading of modules
const lazyLoad = require('@salesforce/lazy-require').default.create('name-of-typecache');
lazyLoad.start();

Current Tags

  • 0.3.2                                ...           latest (15 days ago)

25 Versions

  • 0.3.2                                ...           15 days ago
  • 0.3.1                                ...           17 days ago
  • 0.3.0                                ...           18 days ago
  • 0.2.3                                ...           a month ago
  • 0.2.2                                ...           5 months ago
  • 0.2.1                                ...           a year ago
  • 0.2.0                                ...           a year ago
  • 0.1.15                                ...           a year ago
  • 0.1.14                                ...           a year ago
  • 0.1.13                                ...           a year ago
  • 0.1.12                                ...           2 years ago
  • 0.1.11                                ...           2 years ago
  • 0.1.10                                ...           2 years ago
  • 0.1.9                                ...           2 years ago
  • 0.1.8                                ...           2 years ago
  • 0.1.7                                ...           2 years ago
  • 0.1.6                                ...           2 years ago
  • 0.1.5                                ...           2 years ago
  • 0.1.4                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago

Copyright 2014 - 2016 © taobao.org |