File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ const args = {
2323 'false-primitive' : true ,
2424 'false-object' : int32Array ,
2525 } ,
26+ DataView : {
27+ 'true' : dataView ,
28+ 'false-primitive' : true ,
29+ 'false-object' : uint8Array ,
30+ } ,
2631} ;
2732
2833const bench = common . createBenchmark ( main , {
Original file line number Diff line number Diff line change 66 TypedArrayPrototypeGetSymbolToStringTag,
77} = primordials ;
88
9+ function isDataView ( value ) {
10+ return ArrayBufferIsView ( value ) && TypedArrayPrototypeGetSymbolToStringTag ( value ) === undefined ;
11+ }
12+
913function isTypedArray ( value ) {
1014 return TypedArrayPrototypeGetSymbolToStringTag ( value ) !== undefined ;
1115}
@@ -61,6 +65,7 @@ function isBigUint64Array(value) {
6165module . exports = {
6266 ...internalBinding ( 'types' ) ,
6367 isArrayBufferView : ArrayBufferIsView ,
68+ isDataView,
6469 isTypedArray,
6570 isUint8Array,
6671 isUint8ClampedArray,
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ namespace {
1919 V (AsyncFunction) \
2020 V (BigIntObject) \
2121 V (BooleanObject) \
22- V (DataView) \
2322 V (Date) \
2423 V (External) \
2524 V (GeneratorFunction) \
You can’t perform that action at this time.
0 commit comments