diff options
| author | altaf-creator <dev@altafcreator.com> | 2025-11-09 11:15:19 +0800 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2025-11-09 11:15:19 +0800 |
| commit | 8eff962cab608341a6f2fedc640a0e32d96f26e2 (patch) | |
| tree | 05534d1a720ddc3691d346c69b4972555820a061 /frontend-old/node_modules/@protobufjs/inquire | |
pain
Diffstat (limited to 'frontend-old/node_modules/@protobufjs/inquire')
11 files changed, 113 insertions, 0 deletions
diff --git a/frontend-old/node_modules/@protobufjs/inquire/.npmignore b/frontend-old/node_modules/@protobufjs/inquire/.npmignore new file mode 100644 index 0000000..ce75de4 --- /dev/null +++ b/frontend-old/node_modules/@protobufjs/inquire/.npmignore @@ -0,0 +1,3 @@ +npm-debug.*
+node_modules/
+coverage/
diff --git a/frontend-old/node_modules/@protobufjs/inquire/LICENSE b/frontend-old/node_modules/@protobufjs/inquire/LICENSE new file mode 100644 index 0000000..2a2d560 --- /dev/null +++ b/frontend-old/node_modules/@protobufjs/inquire/LICENSE @@ -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.
diff --git a/frontend-old/node_modules/@protobufjs/inquire/README.md b/frontend-old/node_modules/@protobufjs/inquire/README.md new file mode 100644 index 0000000..22f9968 --- /dev/null +++ b/frontend-old/node_modules/@protobufjs/inquire/README.md @@ -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)
diff --git a/frontend-old/node_modules/@protobufjs/inquire/index.d.ts b/frontend-old/node_modules/@protobufjs/inquire/index.d.ts new file mode 100644 index 0000000..6f9825b --- /dev/null +++ b/frontend-old/node_modules/@protobufjs/inquire/index.d.ts @@ -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;
diff --git a/frontend-old/node_modules/@protobufjs/inquire/index.js b/frontend-old/node_modules/@protobufjs/inquire/index.js new file mode 100644 index 0000000..33778b5 --- /dev/null +++ b/frontend-old/node_modules/@protobufjs/inquire/index.js @@ -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;
+}
diff --git a/frontend-old/node_modules/@protobufjs/inquire/package.json b/frontend-old/node_modules/@protobufjs/inquire/package.json new file mode 100644 index 0000000..f4b33db --- /dev/null +++ b/frontend-old/node_modules/@protobufjs/inquire/package.json @@ -0,0 +1,21 @@ +{
+ "name": "@protobufjs/inquire",
+ "description": "Requires a module only if available and hides the require call from bundlers.",
+ "version": "1.1.0",
+ "author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/dcodeIO/protobuf.js.git"
+ },
+ "license": "BSD-3-Clause",
+ "main": "index.js",
+ "types": "index.d.ts",
+ "devDependencies": {
+ "istanbul": "^0.4.5",
+ "tape": "^4.6.3"
+ },
+ "scripts": {
+ "test": "tape tests/*.js",
+ "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js"
+ }
+}
\ No newline at end of file diff --git a/frontend-old/node_modules/@protobufjs/inquire/tests/data/array.js b/frontend-old/node_modules/@protobufjs/inquire/tests/data/array.js new file mode 100644 index 0000000..96627c3 --- /dev/null +++ b/frontend-old/node_modules/@protobufjs/inquire/tests/data/array.js @@ -0,0 +1 @@ +module.exports = [1];
diff --git a/frontend-old/node_modules/@protobufjs/inquire/tests/data/emptyArray.js b/frontend-old/node_modules/@protobufjs/inquire/tests/data/emptyArray.js new file mode 100644 index 0000000..0630c8f --- /dev/null +++ b/frontend-old/node_modules/@protobufjs/inquire/tests/data/emptyArray.js @@ -0,0 +1 @@ +module.exports = [];
diff --git a/frontend-old/node_modules/@protobufjs/inquire/tests/data/emptyObject.js b/frontend-old/node_modules/@protobufjs/inquire/tests/data/emptyObject.js new file mode 100644 index 0000000..0369aa4 --- /dev/null +++ b/frontend-old/node_modules/@protobufjs/inquire/tests/data/emptyObject.js @@ -0,0 +1 @@ +module.exports = {};
diff --git a/frontend-old/node_modules/@protobufjs/inquire/tests/data/object.js b/frontend-old/node_modules/@protobufjs/inquire/tests/data/object.js new file mode 100644 index 0000000..3226d44 --- /dev/null +++ b/frontend-old/node_modules/@protobufjs/inquire/tests/data/object.js @@ -0,0 +1 @@ +module.exports = { a: 1 };
diff --git a/frontend-old/node_modules/@protobufjs/inquire/tests/index.js b/frontend-old/node_modules/@protobufjs/inquire/tests/index.js new file mode 100644 index 0000000..7d6496f --- /dev/null +++ b/frontend-old/node_modules/@protobufjs/inquire/tests/index.js @@ -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();
+});
|
