angular/packages/compiler
Alan Agius 146d2ee246 refactor(compiler): replace flatten and map with flatMap. (#48378)
Replace custom `flatten` and `map` with native `flatMap` usage.

Benchmark:
| Test case name 	| Result                                                 	|
|----------------	|--------------------------------------------------------	|
| flatten & map  	| flatten & map x 1,182 ops/sec ±2.18% (63 runs sampled) 	|
| flatMap        	| flatMap x 6,011 ops/sec ±0.91% (35 runs sampled)       	|

The fact that `flatMap` is faster is also highlighted in https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap

PR Close #48378
2022-12-07 09:08:25 -08:00
..
design docs: add oxford commas and rephrase sentences (#47540) 2022-09-29 16:41:32 -07:00
src refactor(compiler): replace flatten and map with flatMap. (#48378) 2022-12-07 09:08:25 -08:00
test fix(compiler): make sure selectors inside container queries are correctly scoped (#48353) 2022-12-06 09:58:59 -08:00
testing feat(bazel): speed up dev-turnaround by bundling types only when packaging (#45405) 2022-04-21 11:09:39 -07:00
BUILD.bazel build(bazel): fix missing dgeni dependencies 2022-11-22 13:51:16 -07:00
compiler.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
package.json feat(core): add support for Node.js version 18 (#47730) 2022-10-11 17:21:19 +00:00
public_api.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00