1
0
mirror of https://github.com/fluencelabs/wasm-bindgen synced 2025-06-22 09:11:35 +00:00
Files
.cargo
ci
crates
anyref-xform
backend
cli
cli-support
futures
js-sys
src
tests
wasm
Array.rs
ArrayBuffer.rs
ArrayIterator.rs
Boolean.rs
DataView.rs
Date.rs
Error.rs
EvalError.rs
Function.js
Function.rs
Generator.js
Generator.rs
Intl.rs
Iterator.js
Iterator.rs
JSON.rs
JsString.js
JsString.rs
Map.rs
MapIterator.rs
Math.rs
Number.rs
Object.js
Object.rs
Promise.rs
Proxy.js
Proxy.rs
RangeError.rs
ReferenceError.rs
Reflect.js
Reflect.rs
RegExp.rs
Set.rs
SetIterator.rs
SharedArrayBuffer.js
SharedArrayBuffer.rs
Symbol.js
Symbol.rs
SyntaxError.rs
TypeError.rs
TypedArray.rs
UriError.rs
WeakMap.rs
WeakSet.rs
WebAssembly.js
WebAssembly.rs
global_fns.rs
main.rs
headless.js
headless.rs
CHANGELOG.md
Cargo.toml
README.md
macro
macro-support
shared
test
test-macro
threads-xform
typescript
typescript-tests
wasm-interpreter
web-sys
webidl
webidl-tests
examples
guide
releases
src
tests
.gitattributes
.gitignore
CHANGELOG.md
CONTRIBUTING.md
Cargo.toml
LICENSE-APACHE
LICENSE-MIT
README.md
_package.json
azure-pipelines.yml
build.rs
publish.rs
wasm-bindgen/crates/js-sys/tests/wasm/Iterator.js

20 lines
493 B
JavaScript
Raw Normal View History

exports.get_iterable = () => ["one", "two", "three"];
exports.get_not_iterable = () => new Object;
exports.get_symbol_iterator_throws = () => ({
[Symbol.iterator]: () => { throw new Error("nope"); },
});
exports.get_symbol_iterator_not_function = () => ({
[Symbol.iterator]: 5,
});
exports.get_symbol_iterator_returns_not_object = () => ({
[Symbol.iterator]: () => 5,
});
exports.get_symbol_iterator_returns_object_without_next = () => ({
[Symbol.iterator]: () => new Object,
});