You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

dnsz

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dnsz - npm Package Compare versions

Comparing version
4.2.0
to
4.2.1
+22
LICENSE
Copyright (c) silverwind
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+2
-10

@@ -77,15 +77,7 @@ type DnsRecord = {

};
/**
* Parse a string of a DNS zone file and returns a `data` object.
* @param {string} str The string of DNS zone file
*/
/** Parse a string of a DNS zone file and returns a `data` object. */
export declare function parseZone(str: string, { replaceOrigin, crlf, defaultTTL, dots }?: ParseOptions): DnsData;
/**
* Parse a `data` object and return a string with the zone file contents.
* @param {DnsData} data The `data` object.
* @param {StringifyOptions} [opts={}] Parse options
* @returns {string} The string with the zone file contents.
*/
/** Parse a `data` object and return a string with the zone file contents. */
export declare function stringifyZone(data: DnsData, { crlf, sections, dots }?: StringifyOptions): string;
export {};
//# sourceMappingURL=index.d.ts.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAGA,KAAK,SAAS,GAAG;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF,KAAK,OAAO,GAAG;IACX;;OAEG;IACH,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,KAAK,YAAY,GAAG;IAChB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;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,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAwQF,qEAAqE;AACrE,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,EAAC,aAA4C,EAAE,IAA0B,EAAE,UAAsC,EAAE,IAA0B,EAAC,GAAE,YAA6B,GAAG,OAAO,CA0F7N;AAED,6EAA6E;AAC7E,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,EAAC,IAA8B,EAAE,QAAsC,EAAE,IAA8B,EAAC,GAAE,gBAAqC,GAAG,MAAM,CA+CpM"}

@@ -48,9 +48,3 @@ const defaults = {

let i = -1;
const state = {
input,
separator,
stack,
prev: () => string[i - 1],
next: () => string[i + 1]
};
const state = {};
const block = () => state.block = stack[stack.length - 1];

@@ -57,0 +51,0 @@ const peek = () => string[i + 1];

{
"name": "dnsz",
"version": "4.2.0",
"version": "4.2.1",
"description": "Generic DNS zone file parser and stringifier",

@@ -17,14 +17,14 @@ "author": "silverwind <me@silverwind.io>",

"devDependencies": {
"@types/node": "20.14.9",
"@types/node": "22.13.4",
"eslint": "8.57.0",
"eslint-config-silverwind": "88.2.0",
"eslint-config-silverwind-typescript": "5.1.2",
"typescript-config-silverwind": "5.1.3",
"updates": "16.2.1",
"versions": "12.1.2",
"vite": "5.3.2",
"vite-config-silverwind": "3.0.0",
"vitest": "1.6.0",
"vitest-config-silverwind": "9.1.0"
"eslint-config-silverwind": "99.0.0",
"eslint-config-silverwind-typescript": "9.2.2",
"typescript-config-silverwind": "7.0.0",
"updates": "16.4.2",
"versions": "12.1.3",
"vite": "6.1.0",
"vite-config-silverwind": "4.0.0",
"vitest": "3.0.5",
"vitest-config-silverwind": "10.0.0"
}
}