forked from enviPath/enviPy
Current Dev State
This commit is contained in:
20
static/js/ketcher2/node_modules/is-resolvable/LICENSE
generated
vendored
Normal file
20
static/js/ketcher2/node_modules/is-resolvable/LICENSE
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 - 2015 Shinnosuke Watanabe
|
||||
|
||||
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.
|
||||
68
static/js/ketcher2/node_modules/is-resolvable/README.md
generated
vendored
Executable file
68
static/js/ketcher2/node_modules/is-resolvable/README.md
generated
vendored
Executable file
@ -0,0 +1,68 @@
|
||||
# is-resolvable
|
||||
|
||||
[](https://www.npmjs.com/package/is-resolvable)
|
||||
[](https://travis-ci.org/shinnn/is-resolvable)
|
||||
[](https://ci.appveyor.com/project/ShinnosukeWatanabe/is-resolvable)
|
||||
[](https://coveralls.io/r/shinnn/is-resolvable)
|
||||
[](https://david-dm.org/shinnn/is-resolvable)
|
||||
[](https://david-dm.org/shinnn/is-resolvable#info=devDependencies)
|
||||
|
||||
A [Node](https://nodejs.org/) module to check if a module ID is resolvable with [`require()`](https://nodejs.org/api/globals.html#globals_require)
|
||||
|
||||
```javascript
|
||||
const isResolvable = require('is-resolvable');
|
||||
|
||||
isResolvable('fs'); //=> true
|
||||
isResolvable('path'); //=> true
|
||||
|
||||
// When `./index.js` exists
|
||||
isResolvable('./index.js') //=> true
|
||||
isResolvable('./index') //=> true
|
||||
isResolvable('.') //=> true
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
[Use npm.](https://docs.npmjs.com/cli/install)
|
||||
|
||||
```
|
||||
npm install is-resolvable
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
```javascript
|
||||
const isResolvable = require('is-resolvable');
|
||||
```
|
||||
|
||||
### isResolvable(*moduleId*)
|
||||
|
||||
*moduleId*: `String` (module ID)
|
||||
Return: `Boolean`
|
||||
|
||||
It returns `true` if `require()` can load a file form a given module ID, otherwise `false`.
|
||||
|
||||
```javascript
|
||||
const isResolvable = require('is-resolvable');
|
||||
|
||||
// When `./foo.json` exists
|
||||
isResolvable('./foo.json'); //=> true
|
||||
isResolvable('./foo'); //=> true
|
||||
|
||||
isResolvable('./foo.js'); //=> false
|
||||
|
||||
|
||||
// When `lodash` module is installed but `underscore` isn't
|
||||
isResolvable('lodash'); //=> true
|
||||
isResolvable('underscore'); //=> false
|
||||
|
||||
// When `readable-stream` module is installed
|
||||
isResolvable('readable-stream/readable'); //=> true
|
||||
isResolvable('readable-stream/writable'); //=> true
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Copyright (c) 2014 - 2015 [Shinnosuke Watanabe](https://github.com/shinnn)
|
||||
|
||||
Licensed under [the MIT License](./LICENSE).
|
||||
26
static/js/ketcher2/node_modules/is-resolvable/index.js
generated
vendored
Executable file
26
static/js/ketcher2/node_modules/is-resolvable/index.js
generated
vendored
Executable file
@ -0,0 +1,26 @@
|
||||
'use strict';
|
||||
|
||||
var tryit = require('tryit');
|
||||
|
||||
module.exports = function isResolvable(moduleId) {
|
||||
if (typeof moduleId !== 'string') {
|
||||
throw new TypeError(
|
||||
moduleId +
|
||||
' is not a string. A module identifier to be checked if resolvable is required.'
|
||||
);
|
||||
}
|
||||
|
||||
var result;
|
||||
tryit(function() {
|
||||
require.resolve(moduleId);
|
||||
}, function(err) {
|
||||
if (err) {
|
||||
result = false;
|
||||
return;
|
||||
}
|
||||
|
||||
result = true;
|
||||
});
|
||||
|
||||
return result;
|
||||
};
|
||||
73
static/js/ketcher2/node_modules/is-resolvable/package.json
generated
vendored
Normal file
73
static/js/ketcher2/node_modules/is-resolvable/package.json
generated
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
{
|
||||
"_from": "is-resolvable@^1.0.0",
|
||||
"_id": "is-resolvable@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=",
|
||||
"_location": "/is-resolvable",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "is-resolvable@^1.0.0",
|
||||
"name": "is-resolvable",
|
||||
"escapedName": "is-resolvable",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/eslint"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz",
|
||||
"_shasum": "8df57c61ea2e3c501408d100fb013cf8d6e0cc62",
|
||||
"_spec": "is-resolvable@^1.0.0",
|
||||
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/eslint",
|
||||
"author": {
|
||||
"name": "Shinnosuke Watanabe",
|
||||
"url": "https://github.com/shinnn"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/shinnn/is-resolvable/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"tryit": "^1.0.1"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Check if a module ID is resolvable with require()",
|
||||
"devDependencies": {
|
||||
"@shinnn/eslintrc-node": "^1.0.2",
|
||||
"eslint": "^0.24.0",
|
||||
"istanbul": "^0.3.17",
|
||||
"tape": "^4.0.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/shinnn/is-resolvable#readme",
|
||||
"keywords": [
|
||||
"read",
|
||||
"file",
|
||||
"font",
|
||||
"glyph",
|
||||
"code-point",
|
||||
"unicode",
|
||||
"parse",
|
||||
"cmap",
|
||||
"table",
|
||||
"data",
|
||||
"metadata"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "is-resolvable",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/shinnn/is-resolvable.git"
|
||||
},
|
||||
"scripts": {
|
||||
"coverage": "istanbul cover test.js",
|
||||
"pretest": "eslint --config node_modules/@shinnn/eslintrc-node/rc.json index.js test.js",
|
||||
"test": "node test.js"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
||||
Reference in New Issue
Block a user