Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/d3/d3-array
/ union
Function
union
src/union.js:3–11 ·
view source on GitHub ↗
(...others)
Source
from the content-addressed store, hash-verified
1
import
{InternSet} from
"internmap"
;
2
3
export
default
function
union(...others) {
4
const
set =
new
InternSet();
5
for
(
const
other of others) {
6
for
(
const
o of other) {
7
set.add(o);
8
}
9
}
10
return
set;
11
}
Callers
1
union-test.js
File · 0.85
Calls
1
add
Method · 0.80
Tested by
no test coverage detected