Comments (2)
But... it is declared in an enclosing class.
This works just fine, logs 2 0 1
in any modern browser:
<!DOCTYPE html>
<html>
<head>
<script type="module">
import { LRUCache } from 'https://unpkg.com/[email protected]/dist/mjs/index.js'
const cache = new LRUCache({ max: 3 })
cache.set('one', 1)
cache.set('two', 2)
cache.set('tre', 3)
cache.get('two')
const internals = LRUCache.unsafeExposeInternals(cache)
console.log(cache.get('two'), internals.head, internals.tail)
</script>
</head>
</html>
Idk what next is doing to LRUCache, but it's not correct.
from node-lru-cache.
I was using an old version of the library via octokit
from node-lru-cache.
Related Issues (20)
- Why does the fetch function return void ? HOT 15
- Cannot read private member #keyMap from an object whose class did not declare it HOT 5
- Breaking change on version 7.15.0 - "Uncaught TypeError: LRU is not a constructor" HOT 2
- Engines constraint HOT 1
- Ever endpoint request, cache is empty, what can I fix? HOT 2
- Structural setup around now forbidden undefined and null values (since v8) HOT 2
- dispose/disposeAfter aren't called on replace HOT 1
- Question about cache eviction HOT 3
- Issue with lru-cache npm module: Unexpected token error and unresolved problems HOT 4
- when i refresh the page,the cache data is clear HOT 1
- Nuxt uses lru-cache to refresh the page causing the cache to be empty HOT 1
- Unexpected token '(' HOT 8
- `ttl` documentation HOT 5
- Cache size HOT 1
- Not working with IOS14.x.x versions HOT 1
- Is the signal passed to the fetchMethod always triggering the abort event? HOT 1
- Advice on avoiding fetches being aborted due to eviction HOT 3
- Cache in Remix app always empty? HOT 2
- Type error: 'LRUCache' can only be imported by using a default import HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-lru-cache.