from-now.js 311 B

1234567891011
  1. import Ember from 'ember';
  2. export function fromNow(input, options) {
  3. if (typeof options !== 'undefined' && typeof options.hash.nosuffix !== 'undefined') {
  4. return input.fromNow(options.hash.nosuffix);
  5. } else {
  6. return input.fromNow();
  7. }
  8. }
  9. export default Ember.Handlebars.makeBoundHelper(fromNow);