indutny / indutny/node-ip

[BUG] ip.isPrivate mocha test fail

Open
#107 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.5k
Forks
228
PR merge metrics
No merged PRs in 30d

Description

# BUG
mocha test fail.
`ip.isPrivate` return wrong result.

# Repodruce
```sh
npm i ip@1.1.5
```

```js
ip=require('./node_modules/ip')
ip.isPrivate(ip.address('private', 'IPV6'))
```

# Expected
true

# Behavior
false

# Versions
Package version: 1.1.5
Runtime: nodejs v14.16.0 and v10.19.0 both fail.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with the issue's npm install and Node.js commands, then inspect the ip.isPrivate and ip.address entry points. Done means ip.isPrivate(ip.address('private', 'IPV6')) returns true on the reported Node.js versions, with the regression covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.