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
| // Based off of definitions defined at https://en.wikipedia.org/wiki/Uniform_Resource_Identifier | |
| // scheme:[//[user:password@]host[:port]][/]path[?query][#fragment] | |
| // NOTE: | |
| // 1. The regex will only match urls with username AND password present. I don't care about tackling an optional password atm. | |
| // Might not even be necessary for WWW use | |
| // 2. Will not match a url without a host (no /relative/paths) | |
| // 3. Any (non-)capture groups can be taken-out to fit your needs | |
| // | |
| // See it in action at: http://regexr.com/3cmin |
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
| !function(win) { | |
| // Define breakpoint values and aliases | |
| var mq = win.mediaBreakPoints = { | |
| xs: 480, | |
| xsMax: 767, | |
| sm: 768, | |
| smMax: 991, | |
| md: 992, | |
| mdMax: 1199, |
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
| shortWords = Ember.A ['of','a','the','and','an','or','nor','but','is','if','then','else','when','at','from','by','on','off','for','in','out','over','to','into','with'] | |
| titleize = (str) -> | |
| strArray = str.split ' ' | |
| strArray = Ember.ArrayPolyfills.map.call strArray, (slug) -> | |
| if index is 0 or not shortWords.contains(slug) | |
| Ember.String.capitalize slug | |
| else slug | |
| strArray.join ' ' |