Ldap-Agent
Join array between expression for NodeJS
What's this?
This is a library for manage ldap database
Installation
Ldap-Agent requires Node.js v8+ to run.
Install the dependencies and start the server.
$ cd yourProject
$ npm install ldap-agent --save
Examples
Array
Code:
const BetweenJoin = require('ldap-agent');
const array = ['Hola', 'Mundo'];
const expression = '[$1]';
const response = BetweenJoin(array, expression);
console.log(response);
Output
[Hello][World]
Object
Code:
const LdapAgent = require('ldap-agent');
const config = {
cn: ['admin'],
dc: ['test', 'com'],
url: 'ldap://127.0.0.1:389',
password: '123456',
};
const Client = new LdapAgent(config);
Client.Init((connectError) => {
if (connectError) {
console.error(`Error connection: ${connectError.message}`);
return;
}
console.log('Connected to ldap server (callback)');
});
For more examples, see '/examples' folder on git repository