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

Different results with old a new version #58

Open
rols2015 opened this issue May 15, 2024 · 0 comments
Open

Different results with old a new version #58

rols2015 opened this issue May 15, 2024 · 0 comments

Comments

@rols2015
Copy link

rols2015 commented May 15, 2024

Hello, I upgraded from v1.0.6 to 2.00 and I got different results:

const localCIDR = new Netmask('10.10');
console.log(localCIDR);

With 2.0.0 output is

Netmask {
  bitmask: 32,
  maskLong: 4294967295,
  netLong: 167772170,
  size: 1,
  base: '10.0.0.10',
  mask: '255.255.255.255',
  hostmask: '0.0.0.0',
  first: '10.0.0.10',
  last: '10.0.0.10',
  broadcast: undefined
}

but with 1.0.6 I had

Netmask {
   bitmask: 16,
     maskLong: 4294901760,
     netLong: 168427520,
     size: 65536,
     base: '10.10.0.0',
     mask: '255.255.0.0',
     hostmask: '0.0.255.255',
     first: '10.10.0.1',
     last: '10.10.255.254',
     broadcast: '10.10.255.255'
 }

I get the same result only if I provide the full adresse

const localCIDR = new Netmask('10.10.0.0/16');
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

1 participant