MCPcopy Index your code
hub / github.com/tensorflow/tfjs / encodeStrings

Function encodeStrings

tfjs-core/src/test_util.ts:181–192  ·  view source on GitHub ↗
(a: RecursiveArray<{}>)

Source from the content-addressed store, hash-verified

179
180/** Encodes strings into utf-8 bytes. */
181export function encodeStrings(a: RecursiveArray<{}>):
182 RecursiveArray<Uint8Array> {
183 for (let i = 0; i < (a as Array<{}>).length; i++) {
184 const val = a[i];
185 if (Array.isArray(val)) {
186 encodeStrings(val);
187 } else {
188 a[i] = encodeString(val as string);
189 }
190 }
191 return a as RecursiveArray<Uint8Array>;
192}
193
194/** Creates an HTMLVideoElement with autoplay-friendly default settings. */
195export function createVideoElement(source: HTMLSourceElement):

Callers 2

tensor_test.tsFile · 0.90
slice_test.tsFile · 0.90

Calls 1

encodeStringFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…