[ADF-4249] Updates for doc review (#4454)

* [ADF-4249] Updates for doc review

* [ADF-4249] Clarified text slightly
This commit is contained in:
Andy Stark
2019-03-19 15:35:59 +00:00
committed by Eugenio Romano
parent 34b5c5a1b3
commit 7fe066b068
17 changed files with 123 additions and 75 deletions

View File

@@ -80,6 +80,11 @@ export class ExtensionService {
this.features = this.loader.getFeatures(config);
}
/**
* Gets features by key.
* @param key Key string, using dot notation
* @returns Features array found by key
*/
getFeature(key: string): any[] {
let properties: string[] = Array.isArray(key) ? [key] : key.split('.');
return properties.reduce((prev, curr) => prev && prev[curr], this.features) || [];