aboutsummaryrefslogtreecommitdiff
path: root/node_modules/is-directory
diff options
context:
space:
mode:
authorDimitri Staessens <[email protected]>2019-10-06 21:37:45 +0200
committerDimitri Staessens <[email protected]>2019-10-06 21:37:45 +0200
commit3c51c3be85bb0d1bdb87ea0d6632f1c256912f27 (patch)
treec7ccc8279b12c4f7bdbbb4270d617e48f51722e4 /node_modules/is-directory
parent412c104bebc507bea9c94fd53b5bdc4b64cbfe31 (diff)
downloadwebsite-3c51c3be85bb0d1bdb87ea0d6632f1c256912f27.tar.gz
website-3c51c3be85bb0d1bdb87ea0d6632f1c256912f27.zip
build: Add some required modules for node
Diffstat (limited to 'node_modules/is-directory')
-rw-r--r--node_modules/is-directory/LICENSE21
-rw-r--r--node_modules/is-directory/README.md76
-rw-r--r--node_modules/is-directory/index.js65
-rw-r--r--node_modules/is-directory/package.json100
4 files changed, 262 insertions, 0 deletions
diff --git a/node_modules/is-directory/LICENSE b/node_modules/is-directory/LICENSE
new file mode 100644
index 0000000..39245ac
--- /dev/null
+++ b/node_modules/is-directory/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2016, Jon Schlinkert.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/is-directory/README.md b/node_modules/is-directory/README.md
new file mode 100644
index 0000000..136c1b5
--- /dev/null
+++ b/node_modules/is-directory/README.md
@@ -0,0 +1,76 @@
+# is-directory [![NPM version](https://img.shields.io/npm/v/is-directory.svg?style=flat)](https://www.npmjs.com/package/is-directory) [![NPM downloads](https://img.shields.io/npm/dm/is-directory.svg?style=flat)](https://npmjs.org/package/is-directory) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-directory.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-directory)
+
+Returns true if a filepath exists on the file system and it's directory.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install is-directory --save
+```
+
+## Usage
+
+```js
+var isDirectory = require('is-directory');
+
+isDirectory('node_modules', function(err, dir) {
+ if (err) throw err;
+ console.log(dir);
+ //=> true
+});
+
+isDirectory.sync('README.md');
+//=> false
+```
+
+## Related projects
+
+You might also be interested in these projects:
+
+* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute)
+* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern.… [more](https://www.npmjs.com/package/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob)
+* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative)
+
+## Contributing
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-directory/issues/new).
+
+## Building docs
+
+Generate readme and API documentation with [verb](https://github.com/verbose/verb):
+
+```sh
+$ npm install verb && npm run docs
+```
+
+Or, if [verb](https://github.com/verbose/verb) is installed globally:
+
+```sh
+$ verb
+```
+
+## Running tests
+
+Install dev dependencies:
+
+```sh
+$ npm install -d && npm test
+```
+
+## Author
+
+**Jon Schlinkert**
+
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+
+## License
+
+Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT license](https://github.com/jonschlinkert/is-directory/blob/master/LICENSE).
+
+***
+
+_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 21, 2016._ \ No newline at end of file
diff --git a/node_modules/is-directory/index.js b/node_modules/is-directory/index.js
new file mode 100644
index 0000000..9288d0f
--- /dev/null
+++ b/node_modules/is-directory/index.js
@@ -0,0 +1,65 @@
+/*!
+ * 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;
diff --git a/node_modules/is-directory/package.json b/node_modules/is-directory/package.json
new file mode 100644
index 0000000..412ac88
--- /dev/null
+++ b/node_modules/is-directory/package.json
@@ -0,0 +1,100 @@
+{
+ "_args": [
+ [
+ "/home/dstaesse/git/website"
+ ]
+ ],
+ "_development": true,
+ "_from": "[email protected]",
+ "_id": "[email protected]",
+ "_inBundle": false,
+ "_integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=",
+ "_location": "/is-directory",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "[email protected]",
+ "name": "is-directory",
+ "escapedName": "is-directory",
+ "rawSpec": "0.3.1",
+ "saveSpec": null,
+ "fetchSpec": "0.3.1"
+ },
+ "_requiredBy": [
+ "/cosmiconfig"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz",
+ "_spec": "0.3.1",
+ "_where": "/home/dstaesse/git/website",
+ "author": {
+ "name": "Jon Schlinkert",
+ "url": "https://github.com/jonschlinkert"
+ },
+ "bugs": {
+ "url": "https://github.com/jonschlinkert/is-directory/issues"
+ },
+ "description": "Returns true if a filepath exists on the file system and it's directory.",
+ "devDependencies": {
+ "gulp-format-md": "^0.1.9",
+ "mocha": "^2.4.5"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/jonschlinkert/is-directory",
+ "keywords": [
+ "dir",
+ "directories",
+ "directory",
+ "dirs",
+ "file",
+ "filepath",
+ "files",
+ "fp",
+ "fs",
+ "node",
+ "node.js",
+ "path",
+ "paths",
+ "system"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "is-directory",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jonschlinkert/is-directory.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "verb": {
+ "toc": false,
+ "layout": "default",
+ "tasks": [
+ "readme"
+ ],
+ "plugins": [
+ "gulp-format-md"
+ ],
+ "related": {
+ "list": [
+ "is-glob",
+ "is-relative",
+ "is-absolute"
+ ]
+ },
+ "lint": {
+ "reflinks": true
+ },
+ "reflinks": [
+ "verb"
+ ]
+ },
+ "version": "0.3.1"
+}