UNPKG

jsmodern

Version:

An extension to existing JavaScript, influenced by other great languages such as Rust, Dart, Java, Golang, etc.

16 lines 464 B
export const from = { isStatic: true, label: 'from', fn: function weakSetFrom(mapEntries) { if (!Array.isArray(mapEntries)) { throw new TypeError(`Invalid WeakSet entries. Each WeakSet entry key must be an object`); } try { return new WeakSet(mapEntries); } catch (_) { throw new TypeError(`WeakSet key must be an object`); } }, }; //# sourceMappingURL=from.js.map