
- Underscore.JS 教程
- Underscore.JS - 主頁
- Underscore.JS - 概覽
- Underscore.JS - 設定環境
- Underscore.JS - 遍歷集合
- Underscore.JS - Processing Collection(處理集合)
- Underscore.JS - 遍歷陣列
- Underscore.JS - Processing Array(處理陣列)
- Underscore.JS - 函式
- Underscore.JS - 對映物件
- Underscore.JS - 更新物件
- Underscore.JS - 比較物件
- Underscore.JS - 實用工具
- Underscore.JS - 鏈式程式設計
- Underscore.JS 有用資源
- Underscore.JS - 快速指南
- Underscore.JS - 有用資源
- Underscore.JS - 討論
Underscore.JS - 函式
Underscore.JS 有許多易於使用的方法,可幫助處理函式。本章將詳細介紹它們。
Underscore.JS 提供了處理函式的各種方法,如下所列,-:
序號 | 方法和語法 |
---|---|
1 | 繫結
_.bind(function, object, *arguments) |
2 | 部分
_.partial(function, *arguments) |
3 | 記憶
_.memoize(function, [hashFunction]) |
4 | 延遲
_.delay(function, wait, *arguments) |
5 | 一次
_.once(function) |
6 | 之前
_.before(count, function) |
7 | 包裝
_.wrap(function, wrapper) |
8 | 否定
_.negate(predicate) |
9 | 撰寫
_.compose(*functions) |
廣告