(path, getall = false)
| 178 | } |
| 179 | |
| 180 | async get(path, getall = false) { |
| 181 | const normalizedPath = normalizePath(path).path |
| 182 | const allValues = this.parsedConfig |
| 183 | .filter(config => config.path === normalizedPath) |
| 184 | .map(({ section, name, value }) => { |
| 185 | const fn = schema[section] && schema[section][name] |
| 186 | return fn ? fn(value) : value |
| 187 | }) |
| 188 | return getall ? allValues : allValues.pop() |
| 189 | } |
| 190 | |
| 191 | async getall(path) { |
| 192 | return this.get(path, true) |
no test coverage detected