From f4744ac35f07c1fd9637d465327e76c1aaabfc4c Mon Sep 17 00:00:00 2001 From: Kevin Gibbons Date: Fri, 28 Jul 2023 15:03:00 -0700 Subject: [PATCH] clarify that `from` is static --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index abfc40e..7863918 100644 --- a/README.md +++ b/README.md @@ -296,10 +296,9 @@ function* naturals() { naturals().find(v => v > 1); // 2 ``` -### `.from(object)` +### `Iterator.from(object)` -`.from` takes an object as an argument. This method allows wrapping "iterator-like" objects with an -iterator. +`.from` is a _static_ method (unlike the others listed above) which takes an object as an argument. This method allows wrapping "iterator-like" objects with an iterator. Returns the object if it is already an iterator, returns a wrapping iterator if the passed object implements a callable @@iterator property.