(props: array<Prop.Node>)
| 258 | |
| 259 | // cheaper props first, though never across one calling user code |
| 260 | const orderedForAllows = (props: array<Prop.Node>): array<Prop.Node> => { |
| 261 | const ordered: Prop.Node[] = [] |
| 262 | let run: Prop.Node[] = [] |
| 263 | const flush = () => |
| 264 | ordered.push(...run.sort((l, r) => allowsRank(l) - allowsRank(r))) |
| 265 | for (const prop of props) { |
| 266 | if (reachesUserCode(prop.value)) { |
| 267 | flush() |
| 268 | ordered.push(prop) |
| 269 | run = [] |
| 270 | } else run.push(prop) |
| 271 | } |
| 272 | flush() |
| 273 | return ordered |
| 274 | } |
| 275 | |
| 276 | interface CopyOptions { |
| 277 | /** whether the site is the first that can change out, so out is still data */ |
no test coverage detected