Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for local filters #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

3 participants