@aml-org/amf-custom-validator 0.1.0-SNAPSHOT.42 → 0.1.0-SNAPSHOT.43

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.
package/index.js CHANGED
@@ -5,7 +5,7 @@ let wasm_gz
5
5
  let wasm
6
6
 
7
7
  let initialized = false
8
- let go = null;
8
+ let go = undefined;
9
9
 
10
10
  const run = function(profile, data, debug) {
11
11
  let before = new Date()
@@ -18,14 +18,14 @@ const run = function(profile, data, debug) {
18
18
  const validateCustomProfile = function(profile, data, debug, cb) {
19
19
  if (initialized) {
20
20
  let res = run(profile, data, debug);
21
- cb(res,null);
21
+ cb(res,undefined);
22
22
  } else {
23
- cb(null,new Error("WASM/GO not initialized"))
23
+ cb(undefined,new Error("WASM/GO not initialized"))
24
24
  }
25
25
  }
26
26
  const initialize = function(cb) {
27
27
  if (initialized === true) {
28
- cb(null)
28
+ cb(undefined)
29
29
  }
30
30
  go = new Go();
31
31
  if(!wasm_gz || !wasm) {
@@ -36,7 +36,7 @@ const initialize = function(cb) {
36
36
  WebAssembly.instantiate(wasm, go.importObject).then((result) => {
37
37
  go.run(result.instance);
38
38
  initialized = true;
39
- cb(null);
39
+ cb(undefined);
40
40
  });
41
41
  } else {
42
42
  cb(new Error("WebAssembly is not supported in your JS environment"));
package/lib/main.wasm.gz CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aml-org/amf-custom-validator",
3
- "version": "0.1.0-SNAPSHOT.42",
3
+ "version": "0.1.0-SNAPSHOT.43",
4
4
  "description": "AMF validator backed by OPA Rego",
5
5
  "main": "index.js",
6
6
  "scripts": {