ldap-async
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -8,7 +8,7 @@ /// <reference types="node" /> | ||
next: () => Promise<{ | ||
done: boolean; | ||
done?: false; | ||
value: T; | ||
}>; | ||
return: () => Promise<{ | ||
done: boolean; | ||
done: true; | ||
value: T; | ||
@@ -15,0 +15,0 @@ }>; |
@@ -276,3 +276,6 @@ "use strict"; | ||
const current = await this.get(dn); | ||
const existingValues = new Set((_a = current[attribute]) !== null && _a !== void 0 ? _a : []); | ||
// the ldap client only returns an array when there are 2 or more elements | ||
// if there is only one element, it comes back as a scalar | ||
const attr = (_a = current[attribute]) !== null && _a !== void 0 ? _a : []; | ||
const existingValues = new Set(Array.isArray(attr) ? attr : [attr]); | ||
const newValues = values.filter(v => !existingValues.has(v)); | ||
@@ -292,3 +295,6 @@ if (newValues.length === 0) | ||
const current = await this.get(dn); | ||
const existingValues = new Set((_a = current[attribute]) !== null && _a !== void 0 ? _a : []); | ||
// the ldap client only returns an array when there are 2 or more elements | ||
// if there is only one element, it comes back as a scalar | ||
const attr = (_a = current[attribute]) !== null && _a !== void 0 ? _a : []; | ||
const existingValues = new Set(Array.isArray(attr) ? attr : [attr]); | ||
const oldValues = values.filter(v => existingValues.has(v)); | ||
@@ -295,0 +301,0 @@ if (oldValues.length === 0) |
{ | ||
"name": "ldap-async", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "A wrapper around ldapjs to provide promises, pooling, config by environment, and other conveniences.", | ||
@@ -37,2 +37,3 @@ "exports": { | ||
"eslint-config-standard-with-typescript": "^21.0.1", | ||
"image-size": "^1.0.1", | ||
"mocha": "^9.0.3", | ||
@@ -39,0 +40,0 @@ "ts-node": "^10.2.0", |
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
29814
467
9