(registryType, fn)
| 231 | * @param {Function} fn Transormation that is applied to the input tree |
| 232 | */ |
| 233 | function setupRegistryFor(registryType, fn) { |
| 234 | return { |
| 235 | extensionsForType(type) { |
| 236 | if (type === registryType) { |
| 237 | return ['hbs']; |
| 238 | } |
| 239 | |
| 240 | return []; |
| 241 | }, |
| 242 | |
| 243 | load(type) { |
| 244 | if (type === registryType) { |
| 245 | return [ |
| 246 | { |
| 247 | toTree() { |
| 248 | return fn.apply(this, arguments); |
| 249 | }, |
| 250 | }, |
| 251 | ]; |
| 252 | } |
| 253 | |
| 254 | return []; |
| 255 | }, |
| 256 | }; |
| 257 | } |
| 258 | |
| 259 | /* |
| 260 | * Generates the object that represents an application's registry where all |
no outgoing calls
no test coverage detected
searching dependent graphs…