(pojo: T)
| 1200 | } |
| 1201 | |
| 1202 | function cloneShallow<T>(pojo: T): T { |
| 1203 | if (Array.isArray(pojo)) return pojo.slice() as T |
| 1204 | if (typeof pojo === "object" && pojo !== null) { |
| 1205 | const proto = Object.getPrototypeOf(pojo) |
| 1206 | if (proto !== Object.prototype && proto !== null) { |
| 1207 | throw new Error("Cannot clone object with non-Object constructor or null prototype") |
| 1208 | } |
| 1209 | return { ...pojo } as T |
| 1210 | } |
| 1211 | return pojo |
| 1212 | } |
| 1213 | |
| 1214 | function compileGet(nodes: Node, kind: Kind): (s: any) => any { |
| 1215 | return (s) => { |
no test coverage detected