UNPKG

1.08 kBSource Map (JSON)View Raw
1{"version":3,"file":"from-unix.pipe.js","sourceRoot":"","sources":["from-unix.pipe.ts"],"names":[],"mappings":";AAAA,6DAA6D;;;;;;;;AAE7D,sCAAqE;AACrE,+BAAiC;AAGjC;IAAA;IAOA,CAAC;IANC,gCAAS,GAAT,UAAU,KAAU;QAAE,cAAiB;aAAjB,UAAiB,EAAjB,qBAAiB,EAAjB,IAAiB;YAAjB,6BAAiB;;QACrC,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC;YAC9B,KAAK,GAAG,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IANU,YAAY;QADxB,WAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;OAChB,YAAY,CAOxB;IAAD,mBAAC;CAAA,AAPD,IAOC;AAPY,oCAAY","sourcesContent":["/* angular2-moment (c) 2015, 2016 Uri Shaked / MIT Licence */\r\n\r\nimport {Pipe, ChangeDetectorRef, PipeTransform} from '@angular/core';\r\nimport * as moment from 'moment';\r\n\r\n@Pipe({ name: 'amFromUnix' })\r\nexport class FromUnixPipe implements PipeTransform {\r\n transform(value: any, ...args: string[]): any {\r\n if (typeof value === 'string') {\r\n value = +value;\r\n }\r\n return moment.unix(value);\r\n }\r\n}\r\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
\No newline at end of file