@@ -32,7 +32,7 @@ exports.valObjectMeta = {
3232 'The value could be an {array}' ,
3333 'noting that typed arrays (e.g. Float32Array) are also supported.' ,
3434 'It could also be an object in the form of' ,
35- 'v: {, dtype: \'float32\', bvals : [/* ... */]}, shape: [dim0 (, dim1, (dim3))]' ,
35+ 'v: {, dtype: \'float32\', buffer : [/* ... */]}, shape: [dim0 (, dim1, (dim3))]' ,
3636 'otherwise, it would be ignored.'
3737 ] . join ( ' ' ) ,
3838 requiredOpts : [ ] ,
@@ -50,7 +50,7 @@ exports.valObjectMeta = {
5050 var uid = propOut . obj . uid ;
5151 var module = propOut . obj . _module ;
5252
53- if ( v . bvals . constructor === ArrayBuffer || ! uid || ! module ) {
53+ if ( v . buffer . constructor === ArrayBuffer || ! uid || ! module ) {
5454 // Already an ArrayBuffer
5555 // decoding is cheap
5656 propOut . set ( decodeTypedArraySpec ( v ) ) ;
@@ -59,11 +59,11 @@ exports.valObjectMeta = {
5959 var cache = module . _b64BufferCache || { } ;
6060
6161 // Check cache
62- var cachedBuffer = ( ( cache [ uid ] || { } ) [ prop ] || { } ) [ v . bvals ] ;
62+ var cachedBuffer = ( ( cache [ uid ] || { } ) [ prop ] || { } ) [ v . buffer ] ;
6363 if ( cachedBuffer !== undefined ) {
6464 // Use cached array buffer instead of base64 encoded
6565 // string
66- v . bvals = cachedBuffer ;
66+ v . buffer = cachedBuffer ;
6767 propOut . set ( decodeTypedArraySpec ( v ) ) ;
6868 } else {
6969 // Not in so cache decode
@@ -76,7 +76,7 @@ exports.valObjectMeta = {
7676 // Clear any prior cache value (only store one per
7777 // trace property
7878 cache [ uid ] [ prop ] = { } ;
79- cache [ uid ] [ prop ] [ v . bvals ] = decoded . buffer ;
79+ cache [ uid ] [ prop ] [ v . buffer ] = decoded . buffer ;
8080 module . _b64BufferCache = cache ;
8181 }
8282 }
0 commit comments