chore: update node_modules with new binary files and dependencies
- Add new binary files for nodemon, onnxruntime-web, and xenova/transformers - Update various JavaScript and TypeScript files in node_modules - Remove unused files and dependencies - Add new test fixtures and documentation files
This commit is contained in:
32
node_modules/onnxruntime-web/lib/wasm/options-utils.js
generated
vendored
Normal file
32
node_modules/onnxruntime-web/lib/wasm/options-utils.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.iterateExtraOptions = void 0;
|
||||
const iterateExtraOptions = (options, prefix, seen, handler) => {
|
||||
if (typeof options == 'object' && options !== null) {
|
||||
if (seen.has(options)) {
|
||||
throw new Error('Circular reference in options');
|
||||
}
|
||||
else {
|
||||
seen.add(options);
|
||||
}
|
||||
}
|
||||
Object.entries(options).forEach(([key, value]) => {
|
||||
const name = (prefix) ? prefix + key : key;
|
||||
if (typeof value === 'object') {
|
||||
(0, exports.iterateExtraOptions)(value, name + '.', seen, handler);
|
||||
}
|
||||
else if (typeof value === 'string' || typeof value === 'number') {
|
||||
handler(name, value.toString());
|
||||
}
|
||||
else if (typeof value === 'boolean') {
|
||||
handler(name, (value) ? '1' : '0');
|
||||
}
|
||||
else {
|
||||
throw new Error(`Can't handle extra config type: ${typeof value}`);
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.iterateExtraOptions = iterateExtraOptions;
|
||||
//# sourceMappingURL=options-utils.js.map
|
||||
Reference in New Issue
Block a user