main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 3 months ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
927 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | Object.defineProperty(exports, "__esModule", {
|
---|
4 | value: true
|
---|
5 | });
|
---|
6 | exports.isIterableIterator = isIterableIterator;
|
---|
7 | exports.mergeOptions = mergeOptions;
|
---|
8 | function mergeOptions(target, source) {
|
---|
9 | for (const k of Object.keys(source)) {
|
---|
10 | if ((k === "parserOpts" || k === "generatorOpts" || k === "assumptions") && source[k]) {
|
---|
11 | const parserOpts = source[k];
|
---|
12 | const targetObj = target[k] || (target[k] = {});
|
---|
13 | mergeDefaultFields(targetObj, parserOpts);
|
---|
14 | } else {
|
---|
15 | const val = source[k];
|
---|
16 | if (val !== undefined) target[k] = val;
|
---|
17 | }
|
---|
18 | }
|
---|
19 | }
|
---|
20 | function mergeDefaultFields(target, source) {
|
---|
21 | for (const k of Object.keys(source)) {
|
---|
22 | const val = source[k];
|
---|
23 | if (val !== undefined) target[k] = val;
|
---|
24 | }
|
---|
25 | }
|
---|
26 | function isIterableIterator(value) {
|
---|
27 | return !!value && typeof value.next === "function" && typeof value[Symbol.iterator] === "function";
|
---|
28 | }
|
---|
29 | 0 && 0;
|
---|
30 |
|
---|
31 | //# sourceMappingURL=util.js.map
|
---|
Note:
See
TracBrowser
for help on using the repository browser.