primea-annotations
Advanced tools
Comparing version 0.0.5 to 0.0.6
20
index.js
@@ -12,3 +12,9 @@ const Stream = require('buffer-pipe') | ||
'f64': 0x7c, | ||
'anyref': 0x70 | ||
'anyref': 0x70, | ||
'module': 0x6f, | ||
'func': 0x6e, | ||
'data': 0x6d, | ||
'elem': 0x6c, | ||
'link': 0x6b, | ||
'id': 0x6a | ||
} | ||
@@ -21,3 +27,9 @@ | ||
0x7c: 'f64', | ||
0x70: 'anyref' | ||
0x70: 'anyref', | ||
0x6f: 'module', | ||
0x6e: 'func', | ||
0x6d: 'data', | ||
0x6c: 'elem', | ||
0x6b: 'link', | ||
0x6a: 'id' | ||
} | ||
@@ -102,4 +114,3 @@ | ||
const index = leb.unsigned.readBn(stream).toNumber() | ||
const t = leb.unsigned.readBn(stream).toNumber() | ||
const type = LANGUAGE_TYPES_BIN[t] | ||
const type = LANGUAGE_TYPES_BIN[leb.unsigned.readBn(stream).toNumber()] | ||
if (!type) { | ||
@@ -279,2 +290,3 @@ throw new Error('invalid param') | ||
} | ||
for (const section of json) { | ||
@@ -281,0 +293,0 @@ const name = section.name |
{ | ||
"name": "primea-annotations", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "parsing/encoding for primea's type annotations", | ||
@@ -29,2 +29,3 @@ "main": "index.js", | ||
"documentation": "^6.3.2", | ||
"minimist": "^1.2.0", | ||
"nyc": "^11.7.1", | ||
@@ -31,0 +32,0 @@ "standard": "^11.0.1", |
@@ -25,3 +25,3 @@ const tape = require('tape') | ||
'params': [ | ||
'anyref' | ||
'func' | ||
] | ||
@@ -99,3 +99,3 @@ }, { | ||
'index': 0, | ||
'type': 'anyref' | ||
'type': 'data' | ||
}] | ||
@@ -102,0 +102,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"params": [ | ||
"anyref" | ||
"func" | ||
] | ||
@@ -8,0 +8,0 @@ }], |
@@ -5,4 +5,4 @@ { | ||
"index": 0, | ||
"type": "anyref" | ||
"type": "data" | ||
}] | ||
} |
@@ -5,4 +5,4 @@ { | ||
"params": [ | ||
"anyref", | ||
"anyref" | ||
"func", | ||
"func" | ||
] | ||
@@ -9,0 +9,0 @@ }], |
@@ -5,4 +5,4 @@ { | ||
"params": [ | ||
"anyref", | ||
"anyref", | ||
"func", | ||
"func", | ||
] | ||
@@ -9,0 +9,0 @@ }], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1845628
45
17583
8