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 asyncMap( list, fn, cb_ ) { | |
| var n = list.length | |
| , result = [] | |
| , errState = null; | |
| function cb (er, data) { | |
| if (errState) return; | |
| if (er) return cb_(errState = er); | |
| results.push(data); | |
| if (--n === 0) // 모든 리스트 처리 완료시 |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>Write Title Here.</title> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
| <link class="include" rel="stylesheet" type="text/css" href="style.css" /> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js" type="text/javascript"></script> | |
| </head> | |
| <body> |
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
| String.prototype.format = function () { | |
| var formatted = this; | |
| for (arg in arguments) { | |
| formatted = formatted.replace("{" + arg + "}", arguments[arg]); | |
| } | |
| return formatted; | |
| }; |
NewerOlder