Last active
March 11, 2017 19:51
-
-
Save denzildoyle/a915b60b5917e00477a430e8bcb34f83 to your computer and use it in GitHub Desktop.
Create filter to filter out domain only from url
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.filter( 'domain', function () { | |
return function ( input ) { | |
var parser = document.createElement('a'); | |
parser.href = input; | |
return parser.hostname; | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment