Have ideas to improve npm?Join in the discussion! »

    dns-sync

    0.2.1 • Public • Published

    node-dns-sync

    Build Status

    Sync/Blocking DNS resolve. Main usecase is in node server startup.

    How to Use

    var dnsSync = require('dns-sync');
     
    console.log(dnsSync.resolve('www.paypal.com'));     //should return the IP address
    console.log(dnsSync.resolve('www.yahoo.com'));
    console.log(dnsSync.resolve('www.non-host.something')); //should return null
     
    console.log(dnsSync.resolve('www.google.com', 'AAAA')); //should return AAAA records
    console.log(dnsSync.resolve('google.com', 'NS'));   //should return NS record

    Install

    npm i dns-sync

    DownloadsWeekly Downloads

    5,770

    Version

    0.2.1

    License

    MIT

    Unpacked Size

    8.3 kB

    Total Files

    13

    Last publish

    Collaborators

    • avatar