Underscore.JS-オブジェクトの更新
Underscore.JSには、オブジェクトの更新に役立つ多くの使いやすいメソッドがあります。この章では、それらについて詳しく説明します。
Underscore.JSは、以下に示すように、オブジェクトの更新を処理するためのさまざまなメソッドを提供します-
| シニア番号 | メソッドと構文 |
|---|---|
| 1 | 拡張する _.extend(destination、* sources) |
| 2 | ピック _.pick(object、* keys) |
| 3 | 省略 _.omit(object、* keys) |
| 4 | デフォルト _.defaults(object、* defaults) |
| 5 | クローン _.clone(object) |
| 6 | タップ _.tap(オブジェクト、インターセプター) |
| 7 | 持っている _.has(object、key) |
| 8 | プロパティ _.property(path) |
| 9 | propertyOf _.propertyOf(object) |