MCPcopy
hub / github.com/jsdom/jsdom / getTypedArrayTypeName

Function getTypedArrayTypeName

lib/jsdom/living/crypto/Crypto-impl.js:54–68  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

52// solution, we imitate the behavior of instanceof by walking the proottype
53// chain.
54function getTypedArrayTypeName(array) {
55 const target = array.constructor;
56 const chain = [target.name];
57 let proto = Object.getPrototypeOf(target);
58 while (proto) {
59 chain.push(proto.name);
60 proto = Object.getPrototypeOf(proto);
61 }
62
63 while (chain.length > 0 && chain[chain.length - 1] !== "TypedArray") {
64 chain.pop();
65 }
66 chain.reverse();
67 return chain[1];
68}

Callers 1

getRandomValuesMethod · 0.85

Calls 2

popMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…