applying transfer to react app

This commit is contained in:
Tyler Koenig
2021-09-20 16:54:47 -04:00
parent 8819f31dd0
commit c612b7d702
37373 changed files with 3775588 additions and 2871 deletions
+6
View File
@@ -0,0 +1,6 @@
ISC License (ISC)
Copyright 2018 Shinnosuke Watanabe
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+73
View File
@@ -0,0 +1,73 @@
# is-resolvable
[![npm version](https://img.shields.io/npm/v/is-resolvable.svg)](https://www.npmjs.com/package/is-resolvable)
[![Build Status](https://travis-ci.org/shinnn/is-resolvable.svg?branch=master)](https://travis-ci.org/shinnn/is-resolvable)
[![Build status](https://ci.appveyor.com/api/projects/status/ww1cdpignehlasbs?svg=true)](https://ci.appveyor.com/project/ShinnosukeWatanabe/is-resolvable)
[![Coverage Status](https://img.shields.io/coveralls/shinnn/is-resolvable.svg)](https://coveralls.io/r/shinnn/is-resolvable)
A [Node.js](https://nodejs.org/) module to check if a given 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](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/getting-started/what-is-npm).
```
npm install is-resolvable
```
## API
```javascript
const isResolvable = require('is-resolvable');
```
### isResolvable(*moduleId* [, *options*])
*moduleId*: `string` (module ID)
*options*: `Object` ([`require.resolve`](https://nodejs.org/api/modules.html#modules_require_resolve_request_options) options)
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 `eslint` module is installed but `jshint` isn't
isResolvable('eslint'); //=> true
isResolvable('jshint'); //=> false
// When `lodash` module is installed
isResolvable('lodash/isObject'); //=> true
isResolvable('lodash/fp/reject.js'); //=> true
```
The second argument accepts an options object for `require.resolve()`.
```javascript
// When ./bar/baz.js exists
isResolvable('./baz.js'); //=> false
isResolvable('./baz.js', {paths: ['bar']}); //=> true
```
## License
[ISC License](./LICENSE) © 2018 Shinnosuke Watanabe
+16
View File
@@ -0,0 +1,16 @@
'use strict';
var inspect = require('util').inspect;
module.exports = function isResolvable(moduleId, options) {
if (typeof moduleId !== 'string') {
throw new TypeError(inspect(moduleId) + ' is not a string. Expected a valid Node.js module identifier (<string>), for example \'eslint\', \'./index.js\', \'./lib\'.');
}
try {
require.resolve(moduleId, options);
return true;
} catch (err) {
return false;
}
};
+72
View File
@@ -0,0 +1,72 @@
{
"_from": "is-resolvable@^1.0.0",
"_id": "is-resolvable@1.1.0",
"_inBundle": false,
"_integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==",
"_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": [
"/cssnano"
],
"_resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz",
"_shasum": "fb18f87ce1feb925169c9a407c19318a3206ed88",
"_spec": "is-resolvable@^1.0.0",
"_where": "/Users/tylerkoenig/Code/personal/react-scss2/node_modules/cssnano",
"author": {
"name": "Shinnosuke Watanabe",
"url": "https://github.com/shinnn"
},
"bugs": {
"url": "https://github.com/shinnn/is-resolvable/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Check if a module ID is resolvable with require()",
"devDependencies": {
"@shinnn/eslint-config-node": "^5.0.0",
"eslint": "^4.16.0",
"istanbul": "^0.4.5",
"tape": "^4.8.0"
},
"eslintConfig": {
"extends": "@shinnn/node",
"rules": {
"no-var": "off",
"prefer-template": "off"
}
},
"files": [
"index.js"
],
"homepage": "https://github.com/shinnn/is-resolvable#readme",
"keywords": [
"file",
"path",
"resolve",
"resolvable",
"check",
"module"
],
"license": "ISC",
"name": "is-resolvable",
"repository": {
"type": "git",
"url": "git+https://github.com/shinnn/is-resolvable.git"
},
"scripts": {
"coverage": "istanbul cover --print=both test.js",
"pretest": "eslint --fix --format=codeframe index.js test.js",
"test": "node --throw-deprecation --track-heap-objects test.js"
},
"version": "1.1.0"
}