ad-promise
Version:
This is a fork of the gheeres node-activedirectory. It fixes some issues with timeouts with very large AD-Groups as well as returning also promises so you won't have to use callbacks
18 lines (16 loc) • 487 B
JavaScript
const _ = require('underscore');
/**
* From the list of options, retrieves the ldapjs search specific options.
*
* @param {Object} opts The opts to parse.
* @returns {Object} The ldapjs opts.
*/
const getLdapSearchOpts = (opts) => {
return (_.pick(opts || {},
// Search
'filter', 'scope', 'attributes', 'controls',
'paged', 'sizeLimit', 'timeLimit', 'typesOnly',
'derefAliases'
));
}
module.exports = getLdapSearchOpts;