dns-packet
Advanced tools
Comparing version 1.3.0 to 1.3.1
12
index.js
@@ -17,3 +17,3 @@ var types = require('./types') | ||
name.encode = function (str, buf, offset) { | ||
if (!buf) buf = Buffer.allocUnsafe(name.encodingLength(n)) | ||
if (!buf) buf = Buffer.allocUnsafe(name.encodingLength(str)) | ||
if (!offset) offset = 0 | ||
@@ -23,5 +23,5 @@ var oldOffset = offset | ||
// strip leading and trailing . | ||
const n = str.replace(/^\.|\.$/gm, '') | ||
var n = str.replace(/^\.|\.$/gm, '') | ||
if (n.length) { | ||
const list = n.split('.') | ||
var list = n.split('.') | ||
@@ -160,3 +160,3 @@ for (var i = 0; i < list.length; i++) { | ||
header.encodingLength = function (h) { | ||
header.encodingLength = function () { | ||
return 12 | ||
@@ -525,3 +525,3 @@ } | ||
ra.encodingLength = function (host) { | ||
ra.encodingLength = function () { | ||
return 6 | ||
@@ -556,3 +556,3 @@ } | ||
raaaa.encodingLength = function (host) { | ||
raaaa.encodingLength = function () { | ||
return 18 | ||
@@ -559,0 +559,0 @@ } |
{ | ||
"name": "dns-packet", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "An abstract-encoding compliant module for encoding / decoding DNS packets", | ||
@@ -14,2 +14,3 @@ "repository": { | ||
"devDependencies": { | ||
"eslint": "^4.15.0", | ||
"standard": "^6.0.5", | ||
@@ -19,3 +20,3 @@ "tape": "^4.4.0" | ||
"scripts": { | ||
"test": "standard && tape test.js" | ||
"test": "standard && eslint --color *.js && tape test.js" | ||
}, | ||
@@ -22,0 +23,0 @@ "bugs": { |
@@ -136,2 +136,10 @@ # dns-packet | ||
#### `NS` | ||
``` js | ||
{ | ||
data: nameServer | ||
} | ||
``` | ||
#### `NULL` | ||
@@ -145,2 +153,19 @@ | ||
#### `SOA` | ||
``` js | ||
{ | ||
data: | ||
{ | ||
mname: domainName, | ||
rname: mailbox, | ||
serial: zoneSerial, | ||
refresh: refreshInterval, | ||
retry: retryInterval, | ||
expire: expireInterval, | ||
minimum: minimumTTL | ||
} | ||
} | ||
``` | ||
#### `SRV` | ||
@@ -208,2 +233,2 @@ | ||
MIT | ||
MIT |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28194
232
3