Skip to content

Commit 2c3a848

Browse files
committed
docs(composition): describe the array copy as keeping members and descriptors
1 parent eabc2b3 commit 2c3a848

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎src/lib/helpers/composition.mjs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @Email: <[email protected]>
88
* -----
99
* @Last modified by: Nate Corcoran <CLDMV> ([email protected])
10-
* @Last modified time: 2026-10-12T12:08:47-07:00 (1791832127)
10+
* @Last modified time: 2026-10-12T13:27:14-07:00 (1791836834)
1111
* -----
1212
* @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
1313
*
@@ -29,8 +29,9 @@
2929
* are added);
3030
* - a user Proxy gets a layer, since a copy would lose its traps and a write or delete would reach its
3131
* target or be refused by it;
32-
* - an array is copied (a shallow `slice()`), and gets a layer when named exports are added
33-
* (`addsMembers`), which an array copy could not carry;
32+
* - an array is copied with everything it holds (its elements and holes, any other own member and
33+
* each member's descriptor, which `slice()` would drop), and gets a layer when named exports are
34+
* added (`addsMembers`);
3435
* - a class instance or built-in (a `Map`, a `Date`) keeps private fields and internal slots no copy
3536
* reproduces; nothing adopts from it, so it is used as-is unless named exports are added, and then
3637
* gets a layer;

0 commit comments

Comments
 (0)