IPv6 to Int or Long
- Dominant language
- JavaScript
- Stars
- 1.5k
- Forks
- 228
- PR merge metrics
- No merged PRs in 30d
Description
Hi I know we can do this for IPv4, but would be really helpful if there was away to do this with IPv6 as well.
```
ip.toLong('127.0.0.1'); // 2130706433
```
The reason is we want to do a query in our database that allows us to search if an IP address is greater or less than what we have stored in the Database. however we can't do that type of search with Strings and need to convert everything to int.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the existing IPv4 toLong implementation and its tests in this Node.js IP library. Determine how IPv6 values should be represented for numeric ordering and database comparisons, then add the conversion behavior and tests covering representative IPv6 addresses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100