lib/extends/_isDirectory.js
function _isDirectory (directory, callback) {

			if ("undefined" === typeof directory) {
				throw new ReferenceError("missing \"directory\" argument");
			}
				else if ("string" !== typeof directory) {
					throw new TypeError("\"directory\" argument is not a string");
				}
				else if ("" === directory.trim()) {
					throw new Error("\"directory\" argument is empty");
				}
			else if ("undefined" === typeof callback) {
				throw new ReferenceError("missing \"callback\" argument");
			}
				else if ("function" !== typeof callback) {
					throw new TypeError("\"callback\" argument is not a function");
				}
			else {

				lstat(directory, (err, stats) => {
					return callback(null, Boolean(!err && stats.isDirectory()));
				});

			}

		}
function _isDirectory (directory, callback) {

			if ("undefined" === typeof directory) {
				throw new ReferenceError("missing \"directory\" argument");
			}
				else if ("string" !== typeof directory) {
					throw new TypeError("\"directory\" argument is not a string");
				}
				else if ("" === directory.trim()) {
					throw new Error("\"directory\" argument is empty");
				}
			else if ("undefined" === typeof callback) {
				throw new ReferenceError("missing \"callback\" argument");
			}
				else if ("function" !== typeof callback) {
					throw new TypeError("\"callback\" argument is not a function");
				}
			else {

				lstat(directory, (err, stats) => {
					return callback(null, Boolean(!err && stats.isDirectory()));
				});

			}

		}
function _isDirectory ( directory , callback ) { if ( "undefined" === typeof directory ) { throw new ReferenceError ( "missing \"directory\" argument" ) ; } else if ( "string" !== typeof directory ) { throw new TypeError ( "\"directory\" argument is not a string" ) ; } else if ( "" === directory . trim ( ) ) { throw new Error ( "\"directory\" argument is empty" ) ; } else if ( "undefined" === typeof callback ) { throw new ReferenceError ( "missing \"callback\" argument" ) ; } else if ( "function" !== typeof callback ) { throw new TypeError ( "\"callback\" argument is not a function" ) ; } else { lstat ( directory , ( err , stats ) => { return callback ( null , Boolean ( ! err && stats . isDirectory ( ) ) ) ; } ) ; } }
methods 
Async isDirectory
@param {string} directory : directory to check
@param {function|null} callback : operation's result
@returns {void}
methods Async isDirectory