equal
deleted
inserted
replaced
140 |
140 |
141 const typedarray_types = { |
141 const typedarray_types = { |
142 INT: (number) => new Int16Array([number]), |
142 INT: (number) => new Int16Array([number]), |
143 BOOL: (truth) => new Int16Array([truth]), |
143 BOOL: (truth) => new Int16Array([truth]), |
144 NODE: (truth) => new Int16Array([truth]), |
144 NODE: (truth) => new Int16Array([truth]), |
|
145 REAL: (number) => new Float32Array([number]), |
145 STRING: (str) => { |
146 STRING: (str) => { |
146 // beremiz default string max size is 128 |
147 // beremiz default string max size is 128 |
147 str = str.slice(0,128); |
148 str = str.slice(0,128); |
148 binary = new Uint8Array(str.length + 1); |
149 binary = new Uint8Array(str.length + 1); |
149 binary[0] = str.length; |
150 binary[0] = str.length; |