昌里大金猪的空间 nomospace.github.com

昌里大金猪的空间

站名: 昌里大金猪的空间

网址: http://nomospace.github.com

目录: 电脑网络 > 网址黄页

PR:

Alexa: 63

备案号:

服务器IP: 199.27.79.133   美国 加利福尼亚州洛杉矶Wikia

描述: 昌里大金猪的空间

查询: [ 网站综合查询 | PR查询 | Alexa排名 | 同IP网站 ]

详细介绍

nomospace一种灵活的回调参数设计 [翻译]2012-09-11 posted in [javascript]原文地址:http://caolanmcmahon.com/posts/flexible_callback_arguments/原文作者:Caolan McMahon_.map([1,2,3], function (value, index) { ... });_.map([1,2,3], function (value, index, arr) { ... });// fn.length == 3var fn = function (one) { ... };// fn.length == 1// the full list of available argumentsvar args = ['value', 'index', 'arr'];// remove the unused argumentsargs = args.slice(0, iterator.length - 1);// add the callback to the endargs.push('callback');// run the iterator with the new argumentsreturn iterator.apply(this, args);};console.log('Example one:');test(function (value, index, arr, callback) {console.log(value);console.log(index);console.log(arr);console.log(callback);});console.log('Example two:');test(function (value, callback) {console.log(value);console.log(callback);});valueindexarrcallbackExample two:valuecallbackconsole.log(arguments[0]);console.log(arguments[1]);console.log(arguments[2]);console.log(arguments[3]);});indexcallbackundefined// the full list of available argumentsvar args = ['value', 'index', 'arr'];if (iterator.length) {// remove the unused argumentsargs = args.slice(0, iterator.length - 1);}// add the callback to the endargs.push('callback');// run the iterator with the new argumentsreturn iterator.apply(this, args);};indexarrcallbackr.js 配置文件 example.build.js 不完整注释2012-08-10 posted in [node]Watermark.js for NodeJS2011-06-22 posted in [node]关注 CSS Lint2011-06-16 posted in [css]也谈谈Javascript中的几个"怪异"特性2011-06-11 posted in [javascript]node.js 下的短网址还原2011-06-10 posted in [node]html5 文件拖放的一个简单实例2011-06-09 posted in [html5]
也说说 yupoo 的页面
2011-06-06 posted in [frontend]
浅析 kangax 提出的 Javascript quiz
2011-05-10 posted in [javascript]
My Simple & Stupid Match Game v0.2
2011-05-02 posted in [javascript]
JavaScript 中的作用域与变量声明提升 [翻译]
2011-04-11 posted in [javascript]
弱小版 ImageLazyLoad
2011-04-01 posted in [frontend]
IE6 下的多类选择符
2011-03-31 posted in [frontend]
高度自适应与 Opera's 32767 Bug
2011-03-29 posted in [frontend]
改善用户体验:图片的预加载[翻译]
2011-03-16 posted in [javascript]
Essential Javascript Design Patterns For Beginners [翻译]
2011-03-04 posted in [javascript]
昌里大金猪的空间

分类
javascript
node
css
html5
frontend
搜索
我的豆瓣
我的项目
关于
nomospace
版权申明
Powered by
Disqus,
Google Custom Search,
GitHub,
Gravatar,
HighlightJS,
jekyll,
SimpleGray

猜你喜欢