sindresorhus / npm-keyword Goto Github PK
View Code? Open in Web Editor NEWGet a list of npm packages with keywords
License: MIT License
Get a list of npm packages with keywords
License: MIT License
Hi, while working at b12-archive/keyword-popularity#1 I noticed that npmKeyword.count()
chokes on a keyword that doesn’t exist.
Here’s what my REPL shouts:
npmKeyword.count('äąâ')
// …after a while:
TypeError: Cannot read property 'value' of undefined
at …/node_modules/npm-keyword/index.js:64:19
at …/node_modules/npm-keyword/index.js:24:3
at …/node_modules/npm-keyword/node_modules/got/index.js:99:4
at BufferStream.<anonymous> (…/node_modules/npm-keyword/node_modules/got/node_modules/read-all-stream/index.js:64:3)
at BufferStream.emit (events.js:129:20)
at finishMaybe (…/node_modules/npm-keyword/node_modules/got/node_modules/read-all-stream/node_modules/readable-stream/lib/_stream_writable.js:502:14)
at afterWrite (…/node_modules/npm-keyword/node_modules/got/node_modules/read-all-stream/node_modules/readable-stream/lib/_stream_writable.js:381:3)
at afterTick (…/node_modules/npm-keyword/node_modules/got/node_modules/read-all-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js:11:8)
at process._tickDomainCallback (node.js:381:11)
Maybe an optional count to return param, something like?
npmKeyword('gulpplugin', 5).then(packages => {
console.log(packages);
//=> array of length 5 [{name: 'gulp-autoprefixer', description: '...'}, ...]
});
Hej,
the endpoint used by that module is returning timeout errors frequently and will be probably be retired soon.
This is the feedback I got from npm support regarding yeoman/yo#544.
Thanks for reaching out. I've reached out to our team. They are in the process of retiring all endpoints as there are performance issues and timeouts. Per our team, you could run the below curl command instead:
curl -XGET https://registry.npmjs.org/-/v1/search?text=keywords:yeoman-generator | json
For more information on the new search API, please go to:
https://github.com/npm/registry/blob/master/docs/REGISTRY-API.md#get-v1searchPlease let us know if there is anything else we can do for you. We’ll be here to help. Thank you.
Problem with the new endpoint is that the result set is limited to a maximum of 250 😞
That means for getting all yeoman generators (6984) we would need to call that endpoint almost 30 times 🙀
Maybe the npms.io API offers an alternative endpoint to get all results with just one request.
This would at least a way to workaround the API limit of 250 maximum results like described here.
Plus this would actually be needed to fix yeoman/yo#544 in a sane way.
I would love to work on this if you accept that feature request and #11 is merged.
Cheers, Michael
It seems that el
doesn't contain version related information.
Is it possible to get the latest module versions?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.