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.

    Keywords

    none

    Install

    npm i txt-chunk-processor

    DownloadsWeekly Downloads

    0

    Version

    1.0.0

    License

    Unlicense

    Unpacked Size

    3.08 kB

    Total Files

    6

    Last publish

    Collaborators

    • theel0ja