mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
19 lines
443 B
TypeScript
19 lines
443 B
TypeScript
import { get } from 'lodash';
|
|
import { Service } from 'typedi';
|
|
import { FeaturesConfigure } from './constants';
|
|
|
|
@Service()
|
|
export class FeaturesConfigureManager {
|
|
/**
|
|
*
|
|
* @param featureName
|
|
* @returns
|
|
*/
|
|
getFeatureConfigure = (featureName: string, accessor?: string) => {
|
|
const meta = FeaturesConfigure.find(
|
|
(feature) => feature.name === featureName
|
|
);
|
|
return accessor ? get(meta, accessor) : meta;
|
|
};
|
|
}
|