Comparing version 3.0.1 to 3.0.2
@@ -50,6 +50,6 @@ // Copyright 2011 Mark Cavage, Inc. All rights reserved. | ||
for (let i = start; i < end; i++) { | ||
if (argv[i] instanceof Array) { | ||
if (Array.isArray(argv[i])) { | ||
const arr = argv[i] | ||
for (let j = 0; j < arr.length; j++) { | ||
if (!(arr[j] instanceof Function)) { | ||
if (typeof arr[j] !== 'function') { | ||
throw new TypeError('Invalid argument type: ' + typeof (arr[j])) | ||
@@ -59,3 +59,3 @@ } | ||
} | ||
} else if (argv[i] instanceof Function) { | ||
} else if (typeof argv[i] === 'function') { | ||
handlers.push(argv[i]) | ||
@@ -62,0 +62,0 @@ } else { |
@@ -6,3 +6,3 @@ { | ||
"description": "LDAP client and server APIs", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"license": "MIT", | ||
@@ -21,3 +21,3 @@ "repository": { | ||
"@ldapjs/filter": "2.0.0", | ||
"@ldapjs/messages": "1.0.1", | ||
"@ldapjs/messages": "1.0.2", | ||
"@ldapjs/protocol": "^1.2.1", | ||
@@ -33,3 +33,3 @@ "abstract-logging": "^2.0.1", | ||
"@fastify/pre-commit": "^2.0.2", | ||
"eslint": "8.35.0", | ||
"eslint": "8.36.0", | ||
"eslint-config-standard": "^17.0.0", | ||
@@ -36,0 +36,0 @@ "eslint-plugin-import": "^2.27.5", |
@@ -83,5 +83,5 @@ 'use strict' | ||
t.ok(memberAttr) | ||
t.ok(memberAttr.vals) | ||
t.type(memberAttr.vals, Array) | ||
t.equal(memberAttr.vals.length, 2000) | ||
t.ok(memberAttr.values) | ||
t.type(memberAttr.values, Array) | ||
t.equal(memberAttr.values.length, 2000) | ||
@@ -88,0 +88,0 @@ client.unbind(t.end) |
@@ -6,2 +6,3 @@ 'use strict' | ||
const vasync = require('vasync') | ||
const vm = require('node:vm') | ||
const { getSock } = require('./utils') | ||
@@ -438,1 +439,14 @@ const ldap = require('../lib') | ||
}) | ||
tap.test('cross-realm type checks', function (t) { | ||
const server = ldap.createServer() | ||
const ctx = vm.createContext({}) | ||
vm.runInContext( | ||
'globalThis.search=function(){};\n' + | ||
'globalThis.searches=[function(){}];' | ||
, ctx) | ||
server.search('', ctx.search) | ||
server.search('', ctx.searches) | ||
t.ok(server) | ||
t.end() | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
318820
75
6927
14
+ Added@ldapjs/messages@1.0.2(transitive)
- Removed@ldapjs/messages@1.0.1(transitive)
Updated@ldapjs/messages@1.0.2