UNPKG

1.04 kBSource Map (JSON)View Raw
1{"version":3,"file":"locale.pipe.js","sourceRoot":"","sources":["locale.pipe.ts"],"names":[],"mappings":";;;;;;;;AAAA,sCAAoD;AACpD,+BAAiC;AAEjC,4FAA4F;AAC5F,IAAM,iBAAiB,GAAyC,MAAO,CAAC,OAAO,IAAI,MAAM,CAAC;AAG1F;IAAA;IAIA,CAAC;IAHC,8BAAS,GAAT,UAAU,KAAa,EAAE,MAAc;QACrC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAHU,UAAU;QADtB,WAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;OACd,UAAU,CAItB;IAAD,iBAAC;CAAA,AAJD,IAIC;AAJY,gCAAU","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: 'amLocale' })\r\nexport class LocalePipe implements PipeTransform {\r\n transform(value: string, locale: string): moment.Moment {\r\n return moment(value).locale(locale);\r\n }\r\n}\r\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
\No newline at end of file