Skip to content

Commit

Permalink
release: v1.39.0
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed Nov 21, 2023
1 parent cea6a77 commit ce9a264
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
## v1.39.0 (21 Nov 2023)

* feat: add isStrBlank

## v1.38.2 (4 Jul 2023)

* fix(remove): loop through undefined values
Expand Down
2 changes: 2 additions & 0 deletions index.json
Expand Up @@ -4043,6 +4043,7 @@
"browser",
"miniprogram"
],
"since": "1.39.0",
"test": [
"node",
"browser"
Expand Down Expand Up @@ -4264,6 +4265,7 @@
"stackTrace",
"splitPath",
"startWith",
"endWith",
"defineProp",
"isStr",
"has",
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "licia",
"version": "1.38.2",
"version": "1.39.0",
"description": "Useful utility collection with zero dependencies",
"bin": {
"licia": "./bin/licia.js"
Expand Down
1 change: 1 addition & 0 deletions src/isStrBlank.js
Expand Up @@ -15,6 +15,7 @@

/* module
* env: all
* since: 1.39.0
*/

/* typescript
Expand Down
13 changes: 12 additions & 1 deletion src/lazyImport.js
Expand Up @@ -28,7 +28,7 @@
*/

_(
'stackTrace splitPath startWith defineProp isStr has objToStr unique concat keys isArr toBool'
'stackTrace splitPath startWith endWith defineProp isStr has objToStr unique concat keys isArr toBool'
);

const path = require('path');
Expand All @@ -41,6 +41,17 @@ exports = function(importFn, dirname) {
}
moduleId = path.join(dirname, moduleId);
}

const { cache } = importFn;
if (cache) {
if (cache[moduleId]) {
return cache[moduleId];
}
if (!endWith(moduleId, '.js') && cache[`${moduleId}.js`]) {
return cache[`${moduleId}.js`];
}
}

return proxyExports(importFn, moduleId);
};
};
Expand Down

0 comments on commit ce9a264

Please sign in to comment.