aboutsummaryrefslogtreecommitdiff
path: root/node_modules/is-directory/index.js
diff options
context:
space:
mode:
authorPriyansh <[email protected]>2020-12-22 17:50:12 +0530
committerPriyansh <[email protected]>2020-12-22 17:50:12 +0530
commit22dc033f4938d6a19e086a1cbd36ec5cade5eaab (patch)
tree9feb963ccd5c1581e676e41004801abc67db3357 /node_modules/is-directory/index.js
parente93da8b04da86773247aadb1cbb1912e4f4526b2 (diff)
downloadstyx-22dc033f4938d6a19e086a1cbd36ec5cade5eaab.tar.xz
styx-22dc033f4938d6a19e086a1cbd36ec5cade5eaab.zip
Remove node_modules
Diffstat (limited to 'node_modules/is-directory/index.js')
-rw-r--r--node_modules/is-directory/index.js65
1 files changed, 0 insertions, 65 deletions
diff --git a/node_modules/is-directory/index.js b/node_modules/is-directory/index.js
deleted file mode 100644
index 9288d0f..0000000
--- a/node_modules/is-directory/index.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/*!
- * is-directory <https://github.com/jonschlinkert/is-directory>
- *
- * Copyright (c) 2014-2015, Jon Schlinkert.
- * Licensed under the MIT License.
- */
-
-'use strict';
-
-var fs = require('fs');
-
-/**
- * async
- */
-
-function isDirectory(filepath, cb) {
- if (typeof cb !== 'function') {
- throw new Error('expected a callback function');
- }
-
- if (typeof filepath !== 'string') {
- cb(new Error('expected filepath to be a string'));
- return;
- }
-
- fs.stat(filepath, function(err, stats) {
- if (err) {
- if (err.code === 'ENOENT') {
- cb(null, false);
- return;
- }
- cb(err);
- return;
- }
- cb(null, stats.isDirectory());
- });
-}
-
-/**
- * sync
- */
-
-isDirectory.sync = function isDirectorySync(filepath) {
- if (typeof filepath !== 'string') {
- throw new Error('expected filepath to be a string');
- }
-
- try {
- var stat = fs.statSync(filepath);
- return stat.isDirectory();
- } catch (err) {
- if (err.code === 'ENOENT') {
- return false;
- } else {
- throw err;
- }
- }
- return false;
-};
-
-/**
- * Expose `isDirectory`
- */
-
-module.exports = isDirectory;