UNPKG

1.04 kBSource Map (JSON)View Raw
1{"version":3,"file":"local.pipe.js","sourceRoot":"","sources":["local.pipe.ts"],"names":[],"mappings":";;;;;;;;AAAA,sCAAoD;AACpD,+BAAiC;AAEjC,4FAA4F;AAC5F,IAAM,iBAAiB,GAAyC,MAAO,CAAC,OAAO,IAAI,MAAM,CAAC;AAG1F;IAAA;IAIA,CAAC;IAHG,iCAAS,GAAT,UAAU,KAA6C;QACnD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC;IACjC,CAAC;IAHQ,aAAa;QADzB,WAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;OACb,aAAa,CAIzB;IAAD,oBAAC;CAAA,AAJD,IAIC;AAJY,sCAAa","sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\nimport * as moment from 'moment';\r\n\r\n// under systemjs, moment is actually exported as the default export, so we account for that\r\nconst momentConstructor: (value?: any) => moment.Moment = (<any>moment).default || moment;\r\n\r\n@Pipe({ name: 'amLocal' })\r\nexport class LocalTimePipe implements PipeTransform {\r\n transform(value: Date | moment.Moment | string | number): moment.Moment {\r\n return moment(value).local();\r\n }\r\n}\r\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
\No newline at end of file