0.1.11 • Published 3 years ago

@ffee/auto-import v0.1.11

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

auto-import.js

A tool for automatically update and import NPM module

Usage

Install

npm i @ffee/auto-import --save

AutoImport.require

Require the node module. If the module is not installed, install it automatically before loading it.

const AutoImport = require('@ffee/auto-import');

AutoImport.require('koa').then(koa => {
  const app = new koa();
  app.use(async ctx => {
    ctx.body = 'Hello World!';
  });

  app.listen(3000);
});

AutoImport.checkModuleUpdateStatus

Check whether the NPM module needs to be updated.

const AutoImport = require('@ffee/auto-import');

AutoImport.checkModuleUpdateStatus('koa').then(res => {
  console.log(res);
  // {
  //   name: 'koa',
  //   status: false,
  //   message: 'koa had not expired, return current...'
  // }
});

LICENSE

MIT.

0.1.11

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago