easy-mock-ng-service-loader
Version:
a easy way to sync request services from easy-mock.com
12 lines (11 loc) • 371 B
text/typescript
import {EntityDecoratorOptions} from './entity.interface';
export function EntityDecorator (options: EntityDecoratorOptions) {
return (target: Function) => {
if (options.url[options.url.length - 1] === '/') {
const url: any = options.url.split('');
url.pop();
options.url = url.join('');
}
Object.assign(target.prototype, options);
};
}