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

Javascript/Node.js port of device-detector #5814

Closed
etienne-martin opened this Issue Sep 17, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@etienne-martin
Contributor

etienne-martin commented Sep 17, 2018

I wanted to use device-detector in a Node.js project but I couldn't find any port of this lib that I could rely on. The only two ports that I found were these guys:
https://github.com/sanchezzzhak/node-device-detector
https://www.npmjs.com/package/device-detector-node

The thing is, they are both poorly tested and unmaintained. I don't want to take the gamble of running these libs in production.

So, I decided to write my own port of device-detector using typescript. It uses this repo as a dependency so it can easily be updated whenever we add new regexes or tests to this repo. It passes the ~6300 tests from this repo and it's also pretty fast. I gave it the original name of device-detector-js:
https://www.npmjs.com/package/device-detector-js

If you guys agree I will create a PR to update the README.md with this new port.

@sgiehl

This comment has been minimized.

Member

sgiehl commented Sep 17, 2018

awesome. feel free to update the README 👍
Btw. you maybe could mention in your readme that missing/incorrect detections should be reported here instead of in your project

@etienne-martin

This comment has been minimized.

Contributor

etienne-martin commented Sep 18, 2018

I just created a Github issue template to tell people where to report issues about missing/incorrect detections: https://github.com/etienne-martin/device-detector-js/issues/new

@etienne-martin

This comment has been minimized.

Contributor

etienne-martin commented Sep 21, 2018

Thanks to @AlexBeauchemin, we updated the library so that it now works in the browser too.

@etienne-martin etienne-martin changed the title from Node.js port of device-detector (Javascript) to Javascript/Node.js port of device-detector Sep 22, 2018

@sgiehl sgiehl closed this Oct 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment