adopted-ember-addons / ember-moment

MIT License
399 stars 122 forks source link

Implement Ember.Copyable #263

Closed Techn1x closed 6 years ago

Techn1x commented 6 years ago

Obviously it's easy to copy a moment just by wrapping it in moment(), but if I wanted to copy a moment using Ember.copy(value, true) then moment needs to implement Ember.Copyable for this to work

Is this possible?

A use case could be having an object like the following;

let momentHash = {
  momentA: moment(),
  momentB: moment(),
  momentC: moment.duration(6, 'hours'),
}

Then wanting to do Ember.copy(momentHash,true)

Thoughts?

jasonmit commented 6 years ago

You'll want to open this against ember-cli-moment-shim.