Download web/node_modules/loupe/lib/set.js from amitesh11/pose: direct link, hf CLI and curl.
- Browser
- Download file 379 Bytes
-
https://huggingface.co/spaces/amitesh11/pose/resolve/main/web/node_modules/loupe/lib/set.js
- Command line
-
hf download hf://spaces/amitesh11/pose/web/node_modules/loupe/lib/set.js
-
curl -L -o set.js https://huggingface.co/spaces/amitesh11/pose/resolve/main/web/node_modules/loupe/lib/set.js
379 Bytes
| import { inspectList } from './helpers' | |
| // IE11 doesn't support `Array.from(set)` | |
| function arrayFromSet(set) { | |
| const values = [] | |
| set.forEach(value => { | |
| values.push(value) | |
| }) | |
| return values | |
| } | |
| export default function inspectSet(set, options) { | |
| if (set.size === 0) return 'Set{}' | |
| options.truncate -= 7 | |
| return `Set{ ${inspectList(arrayFromSet(set), options)} }` | |
| } | |