Remove is_binary from API
This commit is contained in:
parent
6191d1adb3
commit
e6615463ed
7 changed files with 41 additions and 83 deletions
|
|
@ -4,7 +4,6 @@ import {
|
|||
TextWithCursors as wasmTextWithCursors,
|
||||
SpanWithHistory as wasmSpanWithHistory,
|
||||
reconcileWithHistory as wasmReconcileWithHistory,
|
||||
isBinary as wasmIsBinary,
|
||||
getCompactDiff as wasmGetCompactDiff,
|
||||
initSync,
|
||||
} from 'reconcile-text';
|
||||
|
|
@ -272,19 +271,6 @@ export function reconcileWithHistory(
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Check (using heuristics) if the given data is binary or text content.
|
||||
*
|
||||
* Only text inputs can be reconciled using the library's functions.
|
||||
*
|
||||
* @param data - The data to check for binary content. This should be a Uint8Array.
|
||||
* @returns True if the data is likely binary, false if it is likely text.
|
||||
*/
|
||||
export function isBinary(data: Uint8Array): boolean {
|
||||
init();
|
||||
return wasmIsBinary(data);
|
||||
}
|
||||
|
||||
function init() {
|
||||
if (isInitialised) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue