Created
April 1, 2016 09:36
-
-
Save snnwolf/fc081e14379d628bd6b4872446da5b1b to your computer and use it in GitHub Desktop.
Синтетический сахар для coffee. Не забываем про http://sugarjs.com/
This file contains 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
# немного синтетики | |
# fmt = "<p>{0} {1} (<a href='mailto:{2}'>{2}</a>)</p>" | |
String::format = (args...) -> | |
@replace /{(\d+)}/g, (match, number) -> | |
if number < args.length then args[number] else match |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment