Socket
Socket
Sign inDemoInstall

better-lookup

Package Overview
Dependencies
6
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.1.2

7

dist/index.js

@@ -6,3 +6,3 @@ "use strict";

const dns = require("dns");
const fs = require("fs-extra");
const fs = require("fs");
const net_1 = require("net");

@@ -13,2 +13,3 @@ const util_1 = require("util");

const timestamp_1 = require("@hyurl/utils/timestamp");
const readFile = util_1.promisify(fs.readFile);
const resolve4 = util_1.promisify(dns.resolve4);

@@ -34,3 +35,3 @@ const resolve6 = util_1.promisify(dns.resolve6);

}
return (yield fs.readFile(file, "utf8")).split(/\r\n|\n/)
return (yield readFile(file, "utf8")).split(/\r\n|\n/)
.map(line => line.trim())

@@ -255,3 +256,3 @@ .filter(line => !line.startsWith("#"))

let tryAttach = (options) => {
if (!("lookup" in options)) {
if (!options["lookup"]) {
options["lookup"] = function (hostname, options, cb) {

@@ -258,0 +259,0 @@ var _a;

{
"name": "better-lookup",
"version": "1.1.1",
"version": "1.1.2",
"description": "A better async DNS lookup function for Node.js that implements atomic cache operation.",

@@ -9,2 +9,3 @@ "main": "dist/index.js",

"prepublishOnly": "tsc",
"pretest": "tsc",
"test": "mocha --exit"

@@ -32,12 +33,10 @@ },

"https-proxy-agent": "^5.0.0",
"mocha": "^8.1.3"
"mocha": "^7.2.0"
},
"dependencies": {
"@hyurl/utils": "^0.2.5",
"@types/fs-extra": "^8.1.1",
"fs-extra": "^8.1.0"
"@hyurl/utils": "^0.2.5"
},
"engines": {
"node": ">=8.0"
"node": ">=8.3"
}
}
import * as dns from "dns";
import * as fs from "fs-extra";
import * as fs from "fs";
import { isIP, Socket } from "net";

@@ -19,2 +19,3 @@ import { Agent as HttpAgent } from "http";

const readFile = promisify(fs.readFile);
const resolve4 = promisify(dns.resolve4);

@@ -42,3 +43,3 @@ const resolve6 = promisify(dns.resolve6);

return (await fs.readFile(file, "utf8")).split(/\r\n|\n/)
return (await readFile(file, "utf8")).split(/\r\n|\n/)
.map(line => line.trim())

@@ -333,3 +334,3 @@ .filter(line => !line.startsWith("#"))

agent: T & {
createConnection?: (options: any, callback: Function) => Socket
createConnection?: (options: any, callback: Function) => Socket;
},

@@ -339,3 +340,3 @@ family: 0 | 4 | 6 = 0

let tryAttach = (options: Record<string, any>) => {
if (!("lookup" in options)) {
if (!options["lookup"]) {
options["lookup"] = function (

@@ -369,5 +370,5 @@ hostname: string,

function isHttpsProxyAgent(agent: any): agent is { proxy: Record<string, any> } {
function isHttpsProxyAgent(agent: any): agent is { proxy: Record<string, any>; } {
return agent.constructor.name === "HttpsProxyAgent"
&& typeof agent.proxy === "object";
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc