theprogrammablemind 7.3.9-beta.14 → 7.3.9-beta.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/config.js +10 -1
package/package.json CHANGED
@@ -61,6 +61,6 @@
61
61
  "json-stable-stringify": "^1.0.1",
62
62
  "node-fetch": "^2.6.1"
63
63
  },
64
- "version": "7.3.9-beta.14",
64
+ "version": "7.3.9-beta.15",
65
65
  "license": "ISC"
66
66
  }
package/src/config.js CHANGED
@@ -1426,7 +1426,16 @@ class Config {
1426
1426
  }
1427
1427
  }
1428
1428
 
1429
- initializer (fn, { initAfterApi = false } = {}) {
1429
+ initializer (fn, options = {}) {
1430
+ if (options) {
1431
+ for (let option of Object.keys(options)) {
1432
+ const validOptions = ['initAfterApi']
1433
+ if (!['initAfterApi'].includes(option)) {
1434
+ throw `For Config.initializer, unrecognized option ${option}. The valid options are ${validOptions}`
1435
+ }
1436
+ }
1437
+ }
1438
+ const { initAfterApi = false } = options;
1430
1439
  this.wasInitialized = false
1431
1440
  this.initAfterApi = initAfterApi
1432
1441
  this.initializerFn = (args) => {