Download node_modules/d3-array/src/disjoint.js from NKessler/Horizon: direct link, hf CLI and curl.
- Browser
- Download file 404 Bytes
-
https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-array/src/disjoint.js
- Command line
-
hf download hf://NKessler/Horizon/node_modules/d3-array/src/disjoint.js
-
curl -L -o disjoint.js https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-array/src/disjoint.js
404 Bytes
| import {InternSet} from "internmap"; | |
| export default function disjoint(values, other) { | |
| const iterator = other[Symbol.iterator](), set = new InternSet(); | |
| for (const v of values) { | |
| if (set.has(v)) return false; | |
| let value, done; | |
| while (({value, done} = iterator.next())) { | |
| if (done) break; | |
| if (Object.is(v, value)) return false; | |
| set.add(value); | |
| } | |
| } | |
| return true; | |
| } | |