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

18 lines (16 loc) 597 B
const log = require('./service.log'); const re = require('../../configs/config.re'); /** * Checks to see if the value is a distinguished name. * * @private * @param {String} value The value to check to see if it's a distinguished name. * @returns {Boolean} */ function isDistinguishedName(value) { log.trace('isDistinguishedName(%s)', value); if ((!value) || (value.length === 0)) return (false); re.isDistinguishedName.lastIndex = 0; // Reset the regular expression return (re.isDistinguishedName.test(value)); } module.exports = isDistinguishedName;