txt-chunk-processor

1.0.0 • Public • Published

txt-chunk-processor

Combine TXT chunks returned by dnsPromises.resolveTxt

Usage

const { Resolver } = require('dns').promises;
const resolver = new Resolver();
 
const txtChunkProcessor = require("txt-chunk-processor");
 
resolver.resolveTxt("chunk-demo.lelux.fi")
  .then(result => txtChunkProcessor(result))
  .then(result => console.log(result))

See test.js for example.

Example

$ node test.js
Without [
  [ 'chunk', ' ', 'demo', ' ', 'one' ],
  [ 'chunk', ' ', 'demo', ' ', 'two' ]
]
With [ 'chunk demo one', 'chunk demo two' ]
 
$ dig +short TXT chunk-demo.lelux.fi
"chunk" " " "demo" " " "one"
"chunk" " " "demo" " " "two"

Generated using test.js.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i txt-chunk-processor

      Weekly Downloads

      1

      Version

      1.0.0

      License

      Unlicense

      Unpacked Size

      3.08 kB

      Total Files

      6

      Last publish

      Collaborators

      • theel0ja