first commit
This commit is contained in:
3
node_modules/@protobufjs/inquire/.npmignore
generated
vendored
Normal file
3
node_modules/@protobufjs/inquire/.npmignore
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
npm-debug.*
|
||||
node_modules/
|
||||
coverage/
|
26
node_modules/@protobufjs/inquire/LICENSE
generated
vendored
Normal file
26
node_modules/@protobufjs/inquire/LICENSE
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
Copyright (c) 2016, Daniel Wirtz All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of its author, nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
13
node_modules/@protobufjs/inquire/README.md
generated
vendored
Normal file
13
node_modules/@protobufjs/inquire/README.md
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
@protobufjs/inquire
|
||||
===================
|
||||
[](https://www.npmjs.com/package/@protobufjs/inquire)
|
||||
|
||||
Requires a module only if available and hides the require call from bundlers.
|
||||
|
||||
API
|
||||
---
|
||||
|
||||
* **inquire(moduleName: `string`): `?Object`**<br />
|
||||
Requires a module only if available.
|
||||
|
||||
**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause)
|
9
node_modules/@protobufjs/inquire/index.d.ts
generated
vendored
Normal file
9
node_modules/@protobufjs/inquire/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
export = inquire;
|
||||
|
||||
/**
|
||||
* Requires a module only if available.
|
||||
* @memberof util
|
||||
* @param {string} moduleName Module to require
|
||||
* @returns {?Object} Required module if available and not empty, otherwise `null`
|
||||
*/
|
||||
declare function inquire(moduleName: string): Object;
|
17
node_modules/@protobufjs/inquire/index.js
generated
vendored
Normal file
17
node_modules/@protobufjs/inquire/index.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
module.exports = inquire;
|
||||
|
||||
/**
|
||||
* Requires a module only if available.
|
||||
* @memberof util
|
||||
* @param {string} moduleName Module to require
|
||||
* @returns {?Object} Required module if available and not empty, otherwise `null`
|
||||
*/
|
||||
function inquire(moduleName) {
|
||||
try {
|
||||
var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval
|
||||
if (mod && (mod.length || Object.keys(mod).length))
|
||||
return mod;
|
||||
} catch (e) {} // eslint-disable-line no-empty
|
||||
return null;
|
||||
}
|
55
node_modules/@protobufjs/inquire/package.json
generated
vendored
Normal file
55
node_modules/@protobufjs/inquire/package.json
generated
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
{
|
||||
"_from": "@protobufjs/inquire@^1.1.0",
|
||||
"_id": "@protobufjs/inquire@1.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==",
|
||||
"_location": "/@protobufjs/inquire",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "@protobufjs/inquire@^1.1.0",
|
||||
"name": "@protobufjs/inquire",
|
||||
"escapedName": "@protobufjs%2finquire",
|
||||
"scope": "@protobufjs",
|
||||
"rawSpec": "^1.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@protobufjs/fetch",
|
||||
"/protobufjs"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
|
||||
"_shasum": "ff200e3e7cf2429e2dcafc1140828e8cc638f089",
|
||||
"_spec": "@protobufjs/inquire@^1.1.0",
|
||||
"_where": "C:\\projects\\blockchain\\lighting\\lapp-crash-course\\node_modules\\protobufjs",
|
||||
"author": {
|
||||
"name": "Daniel Wirtz",
|
||||
"email": "dcode+protobufjs@dcode.io"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/dcodeIO/protobuf.js/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Requires a module only if available and hides the require call from bundlers.",
|
||||
"devDependencies": {
|
||||
"istanbul": "^0.4.5",
|
||||
"tape": "^4.6.3"
|
||||
},
|
||||
"homepage": "https://github.com/dcodeIO/protobuf.js#readme",
|
||||
"license": "BSD-3-Clause",
|
||||
"main": "index.js",
|
||||
"name": "@protobufjs/inquire",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/dcodeIO/protobuf.js.git"
|
||||
},
|
||||
"scripts": {
|
||||
"coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js",
|
||||
"test": "tape tests/*.js"
|
||||
},
|
||||
"types": "index.d.ts",
|
||||
"version": "1.1.0"
|
||||
}
|
1
node_modules/@protobufjs/inquire/tests/data/array.js
generated
vendored
Normal file
1
node_modules/@protobufjs/inquire/tests/data/array.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
module.exports = [1];
|
1
node_modules/@protobufjs/inquire/tests/data/emptyArray.js
generated
vendored
Normal file
1
node_modules/@protobufjs/inquire/tests/data/emptyArray.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
module.exports = [];
|
1
node_modules/@protobufjs/inquire/tests/data/emptyObject.js
generated
vendored
Normal file
1
node_modules/@protobufjs/inquire/tests/data/emptyObject.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
module.exports = {};
|
1
node_modules/@protobufjs/inquire/tests/data/object.js
generated
vendored
Normal file
1
node_modules/@protobufjs/inquire/tests/data/object.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
module.exports = { a: 1 };
|
20
node_modules/@protobufjs/inquire/tests/index.js
generated
vendored
Normal file
20
node_modules/@protobufjs/inquire/tests/index.js
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
var tape = require("tape");
|
||||
|
||||
var inquire = require("..");
|
||||
|
||||
tape.test("inquire", function(test) {
|
||||
|
||||
test.equal(inquire("buffer").Buffer, Buffer, "should be able to require \"buffer\"");
|
||||
|
||||
test.equal(inquire("%invalid"), null, "should not be able to require \"%invalid\"");
|
||||
|
||||
test.equal(inquire("./tests/data/emptyObject"), null, "should return null when requiring a module exporting an empty object");
|
||||
|
||||
test.equal(inquire("./tests/data/emptyArray"), null, "should return null when requiring a module exporting an empty array");
|
||||
|
||||
test.same(inquire("./tests/data/object"), { a: 1 }, "should return the object if a non-empty object");
|
||||
|
||||
test.same(inquire("./tests/data/array"), [ 1 ], "should return the module if a non-empty array");
|
||||
|
||||
test.end();
|
||||
});
|
Reference in New Issue
Block a user