@@ -32,7 +32,7 @@ exports.valObjectMeta = {
32
32
'The value could be an {array}' ,
33
33
'noting that typed arrays (e.g. Float32Array) are also supported.' ,
34
34
'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))]' ,
36
36
'otherwise, it would be ignored.'
37
37
] . join ( ' ' ) ,
38
38
requiredOpts : [ ] ,
@@ -50,7 +50,7 @@ exports.valObjectMeta = {
50
50
var uid = propOut . obj . uid ;
51
51
var module = propOut . obj . _module ;
52
52
53
- if ( v . bvals . constructor === ArrayBuffer || ! uid || ! module ) {
53
+ if ( v . buffer . constructor === ArrayBuffer || ! uid || ! module ) {
54
54
// Already an ArrayBuffer
55
55
// decoding is cheap
56
56
propOut . set ( decodeTypedArraySpec ( v ) ) ;
@@ -59,11 +59,11 @@ exports.valObjectMeta = {
59
59
var cache = module . _b64BufferCache || { } ;
60
60
61
61
// Check cache
62
- var cachedBuffer = ( ( cache [ uid ] || { } ) [ prop ] || { } ) [ v . bvals ] ;
62
+ var cachedBuffer = ( ( cache [ uid ] || { } ) [ prop ] || { } ) [ v . buffer ] ;
63
63
if ( cachedBuffer !== undefined ) {
64
64
// Use cached array buffer instead of base64 encoded
65
65
// string
66
- v . bvals = cachedBuffer ;
66
+ v . buffer = cachedBuffer ;
67
67
propOut . set ( decodeTypedArraySpec ( v ) ) ;
68
68
} else {
69
69
// Not in so cache decode
@@ -76,7 +76,7 @@ exports.valObjectMeta = {
76
76
// Clear any prior cache value (only store one per
77
77
// trace property
78
78
cache [ uid ] [ prop ] = { } ;
79
- cache [ uid ] [ prop ] [ v . bvals ] = decoded . buffer ;
79
+ cache [ uid ] [ prop ] [ v . buffer ] = decoded . buffer ;
80
80
module . _b64BufferCache = cache ;
81
81
}
82
82
}
0 commit comments