MCPcopy Create free account
hub / github.com/apache/fory / getInternalStringDetector

Function getInternalStringDetector

javascript/packages/core/lib/writer/index.ts:30–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28const MIN_SAFE_BIGINT = BigInt(Number.MIN_SAFE_INTEGER);
29
30function getInternalStringDetector() {
31 try {
32 const { isStringOneByteRepresentation } = require("node:v8");
33 if (typeof isStringOneByteRepresentation === "function") {
34 return isStringOneByteRepresentation;
35 }
36 } catch { /* not available */ }
37 return null;
38}
39
40export class BinaryWriter {
41 private cursor = 0;

Callers 1

constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected