(pojo: T)
| 1185 | } |
| 1186 | |
| 1187 | function cloneShallow<T>(pojo: T): T { |
| 1188 | if (Array.isArray(pojo)) return pojo.slice() as T |
| 1189 | if (typeof pojo === "object" && pojo !== null) { |
| 1190 | const proto = Object.getPrototypeOf(pojo) |
| 1191 | if (proto !== Object.prototype && proto !== null) { |
| 1192 | throw new Error("Cannot clone object with non-Object constructor or null prototype") |
| 1193 | } |
| 1194 | return { ...pojo } as T |
| 1195 | } |
| 1196 | return pojo |
| 1197 | } |
| 1198 | |
| 1199 | function compileGet(nodes: Node, kind: Kind): (s: any) => any { |
| 1200 | return (s) => { |
no outgoing calls
no test coverage detected