UNPKG

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

19 lines (17 loc) 563 B
/** * Checks to see if any of the specified attributes are the wildcard * '*" attribute. * @private * @params {Array} attributes - The attributes to inspect. * @returns {Boolean} */ const _ = require('underscore'); const shouldIncludeAllAttributes = attributes => { return ((typeof (attributes) !== 'undefined') && ((attributes.length === 0) || _.any(attributes || [], function (attribute) { return (attribute === '*'); })) ); } module.exports = shouldIncludeAllAttributes;