* Generate a function that curries a destination key for a flattener * @private * @param {string} key the eventual destination key * @returns {Function} a flattener that remembers that key
(key)
| 457 | * @returns {Function} a flattener that remembers that key |
| 458 | */ |
| 459 | function synonym(key) { |
| 460 | return function (result, tag) { |
| 461 | const fun = flatteners[key]; |
| 462 | fun.apply(null, [result, tag, key].slice(0, fun.length)); |
| 463 | }; |
| 464 | } |
| 465 | |
| 466 | /** |
| 467 | * Treat the existence of a tag as a sign to mark `key` as true in the result |