Skip to content

Commit

Permalink
fix: improve browser compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
wellwelwel committed Sep 20, 2024
1 parent e087a57 commit b2408ed
Show file tree
Hide file tree
Showing 5 changed files with 2,661 additions and 99 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,14 @@ const { createLRU } = require('lru.min');

#### Browser

> Requires **ES6**.
```html
<script src="https://cdn.jsdelivr.net/npm/lru.min/browser/lru.min.js"></script>
```

- You can use tools such as [**Babel**](https://github.com/babel/babel) to increase the compatibility rate.

### Create a new LRU Cache

> Set maximum size when creating **LRU**.
Expand Down
13 changes: 7 additions & 6 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"$schema": "https://biomejs.dev/schemas/1.9.1/schema.json",
"files": {
"include": ["**/**"],
"ignore": [
Expand All @@ -23,13 +23,13 @@
},
"correctness": {
"all": true,
"noNodejsModules": "off"
"noNodejsModules": "off",
"useImportExtensions": "error"
},
"nursery": {
"all": true,
"useImportRestrictions": "off",
"useImportExtensions": "error",
"noConsole": "off"
"noSecrets": "off"
},
"performance": {
"all": true,
Expand All @@ -44,7 +44,8 @@
"suspicious": {
"all": true,
"noConsoleLog": "off",
"noEmptyBlockStatements": "off"
"noEmptyBlockStatements": "off",
"noConsole": "off"
},
"style": {
"all": true,
Expand All @@ -64,7 +65,7 @@
"correctness": {
"noNodejsModules": "off"
},
"nursery": {
"performance": {
"useTopLevelRegex": "off"
}
}
Expand Down
Loading

0 comments on commit b2408ed

Please sign in to comment.