mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-26 13:01:43 -04:00
first commit
This commit is contained in:
committed by
mrugesh mohapatra
parent
d341b9c45e
commit
5bb3556bfd
9
probot/presolver/node_modules/default-require-extensions/js.js
generated
vendored
Normal file
9
probot/presolver/node_modules/default-require-extensions/js.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
var fs = require('fs');
|
||||
var stripBom = require('strip-bom');
|
||||
|
||||
module.exports = function (module, filename) {
|
||||
var content = fs.readFileSync(filename, 'utf8');
|
||||
module._compile(stripBom(content), filename);
|
||||
};
|
||||
14
probot/presolver/node_modules/default-require-extensions/json.js
generated
vendored
Normal file
14
probot/presolver/node_modules/default-require-extensions/json.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
|
||||
var fs = require('fs');
|
||||
var stripBom = require('strip-bom');
|
||||
|
||||
module.exports = function (module, filename) {
|
||||
var content = fs.readFileSync(filename, 'utf8');
|
||||
try {
|
||||
module.exports = JSON.parse(stripBom(content));
|
||||
} catch (err) {
|
||||
err.message = filename + ': ' + err.message;
|
||||
throw err;
|
||||
}
|
||||
};
|
||||
21
probot/presolver/node_modules/default-require-extensions/license
generated
vendored
Normal file
21
probot/presolver/node_modules/default-require-extensions/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Copyright Node.js contributors, James Talmage <james@talmage.io> (github.com/jamestalmage). All rights reserved.
|
||||
|
||||
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.
|
||||
17
probot/presolver/node_modules/default-require-extensions/node_modules/strip-bom/index.js
generated
vendored
Normal file
17
probot/presolver/node_modules/default-require-extensions/node_modules/strip-bom/index.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
var isUtf8 = require('is-utf8');
|
||||
|
||||
module.exports = function (x) {
|
||||
// Catches EFBBBF (UTF-8 BOM) because the buffer-to-string
|
||||
// conversion translates it to FEFF (UTF-16 BOM)
|
||||
if (typeof x === 'string' && x.charCodeAt(0) === 0xFEFF) {
|
||||
return x.slice(1);
|
||||
}
|
||||
|
||||
if (Buffer.isBuffer(x) && isUtf8(x) &&
|
||||
x[0] === 0xEF && x[1] === 0xBB && x[2] === 0xBF) {
|
||||
return x.slice(3);
|
||||
}
|
||||
|
||||
return x;
|
||||
};
|
||||
21
probot/presolver/node_modules/default-require-extensions/node_modules/strip-bom/license
generated
vendored
Normal file
21
probot/presolver/node_modules/default-require-extensions/node_modules/strip-bom/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
||||
74
probot/presolver/node_modules/default-require-extensions/node_modules/strip-bom/package.json
generated
vendored
Normal file
74
probot/presolver/node_modules/default-require-extensions/node_modules/strip-bom/package.json
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"_from": "strip-bom@^2.0.0",
|
||||
"_id": "strip-bom@2.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
|
||||
"_location": "/default-require-extensions/strip-bom",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "strip-bom@^2.0.0",
|
||||
"name": "strip-bom",
|
||||
"escapedName": "strip-bom",
|
||||
"rawSpec": "^2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/default-require-extensions"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
|
||||
"_shasum": "6219a85616520491f35788bdbf1447a99c7e6b0e",
|
||||
"_spec": "strip-bom@^2.0.0",
|
||||
"_where": "/Users/traceybushman/Documents/FreeCodeCamp/presolver/node_modules/default-require-extensions",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/strip-bom/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"is-utf8": "^0.2.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Strip UTF-8 byte order mark (BOM) from a string/buffer",
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/strip-bom#readme",
|
||||
"keywords": [
|
||||
"bom",
|
||||
"strip",
|
||||
"byte",
|
||||
"mark",
|
||||
"unicode",
|
||||
"utf8",
|
||||
"utf-8",
|
||||
"remove",
|
||||
"delete",
|
||||
"trim",
|
||||
"text",
|
||||
"buffer",
|
||||
"string"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "strip-bom",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/strip-bom.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "2.0.0"
|
||||
}
|
||||
39
probot/presolver/node_modules/default-require-extensions/node_modules/strip-bom/readme.md
generated
vendored
Normal file
39
probot/presolver/node_modules/default-require-extensions/node_modules/strip-bom/readme.md
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# strip-bom [](https://travis-ci.org/sindresorhus/strip-bom)
|
||||
|
||||
> Strip UTF-8 [byte order mark](http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a string/buffer
|
||||
|
||||
From Wikipedia:
|
||||
|
||||
> The Unicode Standard permits the BOM in UTF-8, but does not require nor recommend its use. Byte order has no meaning in UTF-8.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save strip-bom
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var fs = require('fs');
|
||||
var stripBom = require('strip-bom');
|
||||
|
||||
stripBom('\uFEFFunicorn');
|
||||
//=> 'unicorn'
|
||||
|
||||
stripBom(fs.readFileSync('unicorn.txt'));
|
||||
//=> 'unicorn'
|
||||
```
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [strip-bom-cli](https://github.com/sindresorhus/strip-bom-cli) - CLI for this module
|
||||
- [strip-bom-stream](https://github.com/sindresorhus/strip-bom-stream) - Stream version of this module
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
77
probot/presolver/node_modules/default-require-extensions/package.json
generated
vendored
Normal file
77
probot/presolver/node_modules/default-require-extensions/package.json
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
{
|
||||
"_from": "default-require-extensions@^1.0.0",
|
||||
"_id": "default-require-extensions@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=",
|
||||
"_location": "/default-require-extensions",
|
||||
"_phantomChildren": {
|
||||
"is-utf8": "0.2.1"
|
||||
},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "default-require-extensions@^1.0.0",
|
||||
"name": "default-require-extensions",
|
||||
"escapedName": "default-require-extensions",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/append-transform"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz",
|
||||
"_shasum": "f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8",
|
||||
"_spec": "default-require-extensions@^1.0.0",
|
||||
"_where": "/Users/traceybushman/Documents/FreeCodeCamp/presolver/node_modules/append-transform",
|
||||
"author": {
|
||||
"name": "James Talmage",
|
||||
"email": "james@talmage.io",
|
||||
"url": "github.com/jamestalmage"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jamestalmage/default-require-extensions/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"strip-bom": "^2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Node's default require extensions as a separate module",
|
||||
"devDependencies": {
|
||||
"ava": "^0.11.0",
|
||||
"nyc": "^5.3.0",
|
||||
"xo": "^0.12.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"js.js",
|
||||
"json.js"
|
||||
],
|
||||
"homepage": "https://github.com/jamestalmage/default-require-extensions#readme",
|
||||
"keywords": [
|
||||
"require",
|
||||
"extension",
|
||||
"default",
|
||||
"node"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "js.js",
|
||||
"name": "default-require-extensions",
|
||||
"nyc": {
|
||||
"exclude": [
|
||||
"test.js",
|
||||
"fixture"
|
||||
]
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jamestalmage/default-require-extensions.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && nyc ava"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
||||
32
probot/presolver/node_modules/default-require-extensions/readme.md
generated
vendored
Normal file
32
probot/presolver/node_modules/default-require-extensions/readme.md
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# default-require-extensions [](https://travis-ci.org/jamestalmage/default-require-extensions)
|
||||
|
||||
> Node's default require extensions as a separate module
|
||||
|
||||
Handy for require extension authors that want reliable access to the default extension implementations.
|
||||
|
||||
By the time your extension is loaded, the default extension may have already been replaced. This provides extensions functionally identical to the default ones, which you know you can access reliably, no matter what extensions have been installed previously.
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save default-require-extensions
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const js = require('default-require-extensions/js');
|
||||
const json = require('default-require-extensions/json');
|
||||
|
||||
require.extensions['.js'] = js;
|
||||
require.extensions['.js'] = json;
|
||||
|
||||
```
|
||||
|
||||
*Note: * You would never actually do the above. Use these in your custom require extensions instead.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © Node.js contributors, [James Talmage](http://github.com/jamestalmage)
|
||||
Reference in New Issue
Block a user