@igo2/common
Version:
55 lines (50 loc) • 2.11 kB
JavaScript
import * as i0 from '@angular/core';
import { Pipe, NgModule } from '@angular/core';
class ClonePipe {
transform(value) {
if (value === undefined) {
return value;
}
if (value instanceof Array) {
return value.map((obj) => Object.assign(Object.create(obj), obj));
}
else {
return Object.assign(Object.create(value), value);
}
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ClonePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: ClonePipe, isStandalone: true, name: "clone" });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ClonePipe, decorators: [{
type: Pipe,
args: [{
name: 'clone',
standalone: true
}]
}] });
/**
* @deprecated import the ClonePipe directly
*/
class IgoCloneModule {
static forRoot() {
return {
ngModule: IgoCloneModule,
providers: []
};
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IgoCloneModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: IgoCloneModule, imports: [ClonePipe], exports: [ClonePipe] });
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IgoCloneModule });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IgoCloneModule, decorators: [{
type: NgModule,
args: [{
imports: [ClonePipe],
exports: [ClonePipe]
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { ClonePipe, IgoCloneModule };
//# sourceMappingURL=igo2-common-clone.mjs.map