Skip to content

Commit ffdd56b

Browse files
FineArchstakejohn
andauthored
Obj:pickを追加 (#14)
* Obj:pick(ja) * Obj:pick(en) * Apply suggestions from code review Co-authored-by: Take-John <[email protected]> * Apply suggestions from code review Co-authored-by: Take-John <[email protected]> * pnpm up --------- Co-authored-by: Take-John <[email protected]>
1 parent d9a51e0 commit ffdd56b

File tree

4 files changed

+145
-126
lines changed

4 files changed

+145
-126
lines changed

docs/en/references/std.md

+4
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ Generates the copy of the object.
186186
#### @Obj:merge&lt;T&gt;(_o1_: obj&lt;T&gt;, _o2_: obj&lt;T&gt;): obj&lt;T&gt;
187187
Returns a merged version of the two objects.
188188

189+
#### @Obj:pick&lt;T&gt;(_o_: obj&lt;T&gt;, _keys_: arr&lt;str&gt;): obj&lt;T&gt;
190+
Extracts `o`'s properties which have keys in _keys_.
191+
Property is set `NULL` when the key is in `keys` but not in `o`.
192+
189193
### :: Error
190194
#### @Error:create(_name_: str, _info_?: any): error
191195
Create error type value.

docs/ja/references/std.md

+4
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ encoded_text をエンコードされたURI構成要素としてデコードし
188188
#### @Obj:merge&lt;T&gt;(_o1_: obj&lt;T&gt;, _o2_: obj&lt;T&gt;): obj&lt;T&gt;
189189
2つのオブジェクトを併合したものを返します。
190190

191+
#### @Obj:pick&lt;T&gt;(_o_: obj&lt;T&gt;, _keys_: arr&lt;str&gt;): obj&lt;T&gt;
192+
オブジェクト`o`のプロパティのうち、キー名が`keys`に含まれるもののみを抽出します。
193+
`keys`にあって`o`にないキーは`NULL`になります。
194+
191195
### :: Error
192196
#### @Error:create(_name_: str, _info_?: any): error
193197
エラー型の値を作成します。

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"lz-string": "^1.5.0",
1414
"markdown-it-mathjax3": "^4.3.2",
1515
"shiki": "^1.24.4",
16-
"vite": "^6.0.5",
16+
"vite": "^6.0.6",
1717
"vitepress": "^1.5.0",
1818
"vue": "^3.5.13"
1919
}

0 commit comments

Comments
 (0)