You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

lib-util.js 295B

123456789101112131415161718192021222324
  1. /**
  2. * @Author: Caven
  3. * @Date: 2022-08-11 18:52:22
  4. */
  5. const cache = {}
  6. /**
  7. * register lib
  8. * @param name
  9. * @param lib
  10. */
  11. export function registerLib(name, lib) {
  12. cache[name] = lib
  13. }
  14. /**
  15. * get lib
  16. * @param name
  17. * @return {*}
  18. */
  19. export function getLib(name) {
  20. return cache[name]
  21. }