Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class constructor LRUCache cannot be invoked without 'new' #171

Open
GuilhermeSantos001 opened this issue Jul 19, 2021 · 3 comments
Open

Comments

@GuilhermeSantos001
Copy link

The way to invoke an instance of LRUCache has changed.

@GuilhermeSantos001
Copy link
Author

GuilhermeSantos001 commented Jul 19, 2021

var LRU = require('lru-cache')
, options = {
max: 5000
, length: function (n, key) { return n * 2 + key.length }
, dispose: function (key, n) { n.close() }
, maxAge: 1000 * 60 * 60
}
, cache = new LRU(options);

hernanc added a commit to hernanc/useragent that referenced this issue Jul 24, 2021
@IPRIT
Copy link

IPRIT commented Jan 22, 2022

Any updates? This problem still doesn't allow using the module. Either mark the module deprecated, or pay attention to the PRs.

@GuilhermeSantos001
Copy link
Author

Any updates? This problem still doesn't allow using the module. Either mark the module deprecated, or pay attention to the PRs.

I am using the module and it is normal. Check the version you are using.

  • Version: "useragent": "^2.3.0" & "@types/useragent": "^2.3.1".
const device = require('express-device');
const useragent = require('useragent');

app.use(device.capture({
    parseUserAgent: true
})), useragent(true);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants