Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ip-address

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ip-address - npm Package Compare versions

Comparing version 5.0.2 to 5.1.0

documentation-theme-default/assets/anchor.js

2

bin/ipv6.js

@@ -7,3 +7,3 @@ #!/usr/bin/env node

var sprintf = require('sprintf').sprintf;
var sprintf = require('sprintf-js').sprintf;
var cli = require('cli');

@@ -10,0 +10,0 @@ var cliff = require('cliff');

@@ -5,3 +5,3 @@ 'use strict';

var common = require('./common.js');
var sprintf = require('sprintf').sprintf;
var sprintf = require('sprintf-js').sprintf;
var util = require('util');

@@ -8,0 +8,0 @@

@@ -7,3 +7,3 @@ 'use strict';

var merge = require('lodash.merge');
var sprintf = require('sprintf').sprintf;
var sprintf = require('sprintf-js').sprintf;
var util = require('util');

@@ -898,2 +898,22 @@

Address6.fromBuffer = function (buf) {
var address = new Array(8);
for (var i = 0; i < 8; i++) {
address[i] = Number(buf.readUInt16BE(i * 2, true)).toString(16);
}
return new Address6(address.join(':'));
};
Address6.prototype.toBuffer = function () {
var buf = new Buffer(16);
this.parsedAddress.forEach(function (octet, i) {
buf.writeUInt16BE(parseInt(octet, 16), i * 2, true);
});
return buf;
};
module.exports = Address6;
'use strict';
var sprintf = require('sprintf');
var sprintf = require('sprintf-js').sprintf;

@@ -5,0 +5,0 @@ /**

@@ -5,3 +5,3 @@ 'use strict';

var helpers = require('./helpers.js');
var sprintf = require('sprintf').sprintf;
var sprintf = require('sprintf-js').sprintf;

@@ -8,0 +8,0 @@ /**

'use strict';
var sprintf = require('sprintf').sprintf;
var sprintf = require('sprintf-js').sprintf;

@@ -5,0 +5,0 @@ var v6 = require('./constants.js');

@@ -10,3 +10,3 @@ {

],
"version": "5.0.2",
"version": "5.1.0",
"author": "Beau Gunderson <beau@beaugunderson.com> (https://beaugunderson.com/)",

@@ -36,7 +36,7 @@ "license": "MIT",

"lodash.merge": "^3.3.2",
"sprintf": "0.1.x"
"sprintf-js": "^1.0.3"
},
"devDependencies": {
"chai": "^3.3.0",
"coveralls": "^2.11.4",
"codecov.io": "^0.1.6",
"documentation": "^2.1.0-alpha2",

@@ -43,0 +43,0 @@ "istanbul": "^0.3.22",

[![travis]](http://travis-ci.org/beaugunderson/ip-address)
[![coverage]](https://coveralls.io/r/beaugunderson/ip-address?branch=master)
[![codecov.io](https://codecov.io/github/beaugunderson/ip-address/coverage.svg?branch=master)](https://codecov.io/github/beaugunderson/ip-address?branch=master)
[![downloads]](https://www.npmjs.com/package/ip-address)

@@ -4,0 +4,0 @@ [![version]](https://www.npmjs.com/package/ip-address)

'use strict';
var sprintf = require('sprintf').sprintf;
var sprintf = require('sprintf-js').sprintf;
var should = require('chai').should();

@@ -5,0 +5,0 @@

@@ -9,3 +9,3 @@ 'use strict';

var BigInteger = require('jsbn');
var sprintf = require('sprintf').sprintf;
var sprintf = require('sprintf-js').sprintf;

@@ -92,2 +92,9 @@ var Address6 = require('../lib/ipv6.js');

it('converts to and from a buffer', function () {
var buf = topic.toBuffer();
var address = Address6.fromBuffer(buf);
address.correctForm().should.equal(topic.correctForm());
});
it('gets the correct type', function () {

@@ -94,0 +101,0 @@ topic.getType().should.equal('Global unicast');

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc