Skip to content

Add support for local filters#90

Open
brandon93s wants to merge 1 commit intobrockpetrie:masterfrom
brandon93s:local-filter
Open

Add support for local filters#90
brandon93s wants to merge 1 commit intobrockpetrie:masterfrom
brandon93s:local-filter

Conversation

@brandon93s
Copy link

@brandon93s brandon93s commented Jul 6, 2018

This PR adds support for the following syntax:

import {moment, duration} from 'vue-moment'

export default {
   data(){ },
   filters: {
      moment,
      duration
   }
}

This allows the filters to be used without having to register them globally.

These changes are backwards compatible and will not impact current users.

@brandon93s
Copy link
Author

@brockpetrie @BrockReece - Is there interest in adding this support? I'm currently using a local fork but would love to use vue-moment!

@BrockReece
Copy link
Collaborator

Hi @brandon93s.

Thanks for your contribution, the change looks good on the surface, I will have a closer look tomorrow though.

@ahoiroman
Copy link

Any chance to get this into the package?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants