Skip to content

Update search pipe to allow searching on a moment object.toString#1

Open
anhany wants to merge 1 commit intoCenteva:masterfrom
anhany:master
Open

Update search pipe to allow searching on a moment object.toString#1
anhany wants to merge 1 commit intoCenteva:masterfrom
anhany:master

Conversation

@anhany
Copy link
Copy Markdown

@anhany anhany commented Dec 16, 2016

I have a moment date object, which is formatted in-line to a format that is more legible than the default format. I'd like the ability to search for that string as if it were just another string.

The private method simply casts the value that is given to it as a moment.Moment type, then makes sure it has the format method. Then, once it has format, we set the formatted string back in, and perform the search.

I also added some tests around the rest of the basic functionality of said search pipe. I'll have to add a WallabyJS configuration file another day.

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.

2 participants