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

Function transform

tfjs-data/src/util/deep_map_test.ts:30–43  ·  view source on GitHub ↗
(x: any)

Source from the content-addressed store, hash-verified

28
29// tslint:disable-next-line:no-any
30function transform(x: any): DeepMapResult {
31 if (x === null) {
32 return null;
33 }
34 if (typeof (x) === 'number') {
35 return {value: integerNames[x], recurse: false};
36 }
37
38 if (isIterable(x)) {
39 return {value: null, recurse: true};
40 } else {
41 return {value: x, recurse: false};
42 }
43}
44
45// tslint:disable-next-line:no-any
46function asyncTransform(x: any): DeepMapAsyncResult {

Callers 2

asyncTransformFunction · 0.70
mapFunction · 0.50

Calls 1

isIterableFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…