0.0.6 • Published 8 months ago

@kevisual/load v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

load fn

主要作用为加载模块,并时刻监测,当检测到已经加载,执行某一个功能。主要的检测是通过hasLoaded

import { BaseLoad } from '@kevisual/load';

const load = new BaseLoad();

load
  .load(
    async () => {
      return {
        a: 1,
        b: 2,
      };
    },
    { key: 'test' },
  )
  .then((res) => {
    console.log('test-load:', res);
  });
console.log('test-loading:', load.loading);
load.hasLoaded('test', { isExist: true }).then((res) => {
  console.log('test-load:has load', res);
});
0.0.6

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

9 months ago