Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ldap-async

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ldap-async - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

2

dist/index.js

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

return;
if (!stream.push(data.object))
if (!stream.push({ ...data.object, _raw: data.raw }))
paused = true;

@@ -176,0 +176,0 @@ });

{
"name": "ldap-async",
"version": "1.2.1",
"version": "1.2.2",
"description": "A wrapper around ldapjs to provide promises, pooling, config by environment, and other conveniences.",

@@ -35,10 +35,4 @@ "exports": {

"@types/node": "^16.6.1",
"@typescript-eslint/eslint-plugin": "^4.6.1",
"@typescript-eslint/parser": "^4.6.1",
"chai": "^4.2.0",
"eslint": "^7.12.1",
"eslint-config-standard-with-typescript": "^21.0.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"mocha": "^9.0.3",

@@ -45,0 +39,0 @@ "ts-node": "^10.2.0",

@@ -70,3 +70,3 @@ # Overview

Convenience methods are provided that allow you to specify the kind of operation you are about
to do and the type of return data you expect. For now only get, search, and setAttribute are implemented.
to do and the type of return data you expect.
## Querying

@@ -158,2 +158,14 @@ ```javascript

## Binary data
Some LDAP services store binary data as properties of records (e.g. user profile photos), but the ldapjs library assumes that all properties are UTF8 strings and will mangle the binary data. To work around this
issue, we provide the raw data inside the property `_raw`. For example, to convert profile photos to data URLs, you could do something like this:
```typescript
const user = await ldap.get(userDn)
const convertedUser = {
...user,
jpegPhoto: `data:image/jpeg;base64,${Buffer.from(user._raw.jpegPhoto).toString('base64')}`,
}
```
## Typescript

@@ -160,0 +172,0 @@ This library is written in typescript and provides its own types. For added convenience, methods that return

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc