/
githubmr
/
facebook-react
Обзор
Документация
Войти
/
githubmr
/
facebook-react
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
v19.2.0
packages/shared/binaryToComparableString.js
19 строк
543 B
Sebastian Markbåge
[Flight] Taint APIs (#27445)
02 окт 2023, 20:55
Не верифицирован
02 окт 2023, 20:55
843ec07
Код
Авторство
О чём код?
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ // Turns a TypedArray or ArrayBuffer into a string that can be used for comparison // in a Map to see if the bytes are the same. export default function binaryToComparableString( view: $ArrayBufferView, ): string { return String.fromCharCode.apply( String, new Uint8Array(view.buffer, view.byteOffset, view.byteLength), ); }