UNPKG

1.33 kBSource Map (JSON)View Raw
1{"version":3,"file":"subtract.pipe.js","sourceRoot":"","sources":["subtract.pipe.ts"],"names":[],"mappings":";AAAA,6DAA6D;;;;;;;;AAE7D,sCAAqE;AACrE,+BAAiC;AAGjC;IAAA;IAOA,CAAC;IANG,gCAAS,GAAT,UAAU,KAAU,EAAE,MAAgC,EAAE,IAA+B;QACnF,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,IAAI,CAAC,OAAO,MAAM,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC;YAC/F,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAChE,CAAC;QACD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAChD,CAAC;IANQ,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: 'amSubtract' })\r\nexport class SubtractPipe implements PipeTransform {\r\n transform(value: any, amount: moment.DurationInputArg1, unit?: moment.DurationInputArg2): any {\r\n if (typeof amount === 'undefined' || (typeof amount === 'number' && typeof unit === 'undefined')) {\r\n throw new Error('SubtractPipe: missing required arguments');\r\n }\r\n return moment(value).subtract(amount, unit);\r\n }\r\n}\r\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
\No newline at end of file