Class

io.scalajs.npm.async

AsyncExtensions

Related Doc: package async

Permalink

implicit final class AsyncExtensions extends AnyVal

Async Extensions

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AsyncExtensions
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AsyncExtensions(async: Async)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val async: Async

    Permalink
  6. def eachFuture[A <: Any](coll: Array[A])(iteratee: (A, AsyncErrorCallback) ⇒ Any): Promise[A]

    Permalink

    Applies the function iteratee to each item in coll, in parallel.

    Applies the function iteratee to each item in coll, in parallel. The iteratee is called with an item from the list, and a callback for when it has finished. If the iteratee passes an error to its callback, the main callback (for the each function) is immediately called with the error.

    Note, that since this function applies iteratee to each item in parallel, there is no guarantee that the iteratee functions will complete in order.

    coll

    A collection to iterate over.

    iteratee

    A function to apply to each item in coll. The iteratee is passed a callback(err) which must be called once it has completed. If no error has occurred, the callback should be run without arguments or with an explicit null argument. The array index is not passed to the iteratee. If you need the index, use forEachOf.

    Annotations
    @inline()
  7. def eachLimitFuture[A <: Any](coll: Array[A], limit: Int)(iteratee: (A, AsyncErrorCallback) ⇒ Any): Promise[A]

    Permalink

    Applies the function iteratee to each item in coll, in parallel.

    Applies the function iteratee to each item in coll, in parallel. The iteratee is called with an item from the list, and a callback for when it has finished. If the iteratee passes an error to its callback, the main callback (for the each function) is immediately called with the error.

    Note, that since this function applies iteratee to each item in parallel, there is no guarantee that the iteratee functions will complete in order.

    coll

    A collection to iterate over.

    limit

    the limit

    iteratee

    A function to apply to each item in coll. The iteratee is passed a callback(err) which must be called once it has completed. If no error has occurred, the callback should be run without arguments or with an explicit null argument. The array index is not passed to the iteratee. If you need the index, use forEachOf.

    Annotations
    @inline()
  8. def eachSeriesFuture[A <: Any](coll: Array[A])(iteratee: (A, AsyncErrorCallback) ⇒ Any): Promise[A]

    Permalink

    Applies the function iteratee to each item in coll, in parallel.

    Applies the function iteratee to each item in coll, in parallel. The iteratee is called with an item from the list, and a callback for when it has finished. If the iteratee passes an error to its callback, the main callback (for the each function) is immediately called with the error.

    Note, that since this function applies iteratee to each item in parallel, there is no guarantee that the iteratee functions will complete in order.

    coll

    A collection to iterate over.

    iteratee

    A function to apply to each item in coll. The iteratee is passed a callback(err) which must be called once it has completed. If no error has occurred, the callback should be run without arguments or with an explicit null argument. The array index is not passed to the iteratee. If you need the index, use forEachOf.

    Annotations
    @inline()
  9. def filterFuture[A <: Any](coll: Array[A])(iteratee: (A, AsyncErrorCallback) ⇒ Boolean): Promise[Array[A]]

    Permalink

    Returns a new array of all the values in coll which pass an async truth test.

    Returns a new array of all the values in coll which pass an async truth test. This operation is performed in parallel, but the results array will be in the same order as the original.

    coll

    A collection to iterate over.

    iteratee

    iteratee(item, callback) - A truth test to apply to each item in coll. The iteratee is passed a callback(err, truthValue) , which must be called with a boolean argument once it has completed. Callback arguments changed in 2.0

    Annotations
    @inline()
  10. def forEachOfFuture[A](coll: Dictionary[A])(iteratee: (A, String, AsyncErrorCallback) ⇒ Any): Promise[Unit]

    Permalink

    Like each, except that it passes the key (or index) as the second argument to the iteratee.

    Like each, except that it passes the key (or index) as the second argument to the iteratee.

    coll

    A collection to iterate over.

    iteratee

    A function to apply to each item in coll. The key is the item's key, or index in the case of an array. The iteratee is passed a callback(err) which must be called once it has completed. If no error has occurred, the callback should be run without arguments or with an explicit null argument.

    Annotations
    @inline()
  11. def forEachOfFuture[A](coll: Array[A])(iteratee: (A, Int, AsyncErrorCallback) ⇒ Any): Promise[Unit]

    Permalink

    Like each, except that it passes the key (or index) as the second argument to the iteratee.

    Like each, except that it passes the key (or index) as the second argument to the iteratee.

    coll

    A collection to iterate over.

    iteratee

    iteratee(item, key, callback) - A function to apply to each item in coll. The key is the item's key, or index in the case of an array. The iteratee is passed a callback(err) which must be called once it has completed. If no error has occurred, the callback should be run without arguments or with an explicit null argument.

    Annotations
    @inline()
  12. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. def parallelFuture[A <: Any](tasks: Array[Function]): Promise[A]

    Permalink

    Run the tasks collection of functions in parallel, without waiting until the previous function has completed.

    Run the tasks collection of functions in parallel, without waiting until the previous function has completed. If any of the functions pass an error to its callback, the main callback is immediately called with the value of the error. Once the tasks have completed, the results are passed to the final callback as an array.

    tasks

    A collection containing functions to run. Each function is passed a callback(err, result) which it must call on completion with an error err (which can be null) and an optional result value.

    Annotations
    @inline()
  15. def rejectFuture[A <: Any](coll: Dictionary[A])(iteratee: (A, String) ⇒ Any): Promise[A]

    Permalink

    The opposite of filter.

    The opposite of filter. Removes values that pass an async truth test.

    coll

    A collection to iterate over.

    iteratee

    iteratee(item, callback) - A truth test to apply to each item in coll. The iteratee is passed a callback(err, truthValue) , which must be called with a boolean argument once it has completed. Callback arguments changed in 2.0

    Annotations
    @inline()
  16. def rejectFuture[A <: Any](coll: Array[A])(iteratee: (A, Int) ⇒ Any): Promise[A]

    Permalink

    The opposite of filter.

    The opposite of filter. Removes values that pass an async truth test.

    coll

    A collection to iterate over.

    iteratee

    iteratee(item, callback) - A truth test to apply to each item in coll. The iteratee is passed a callback(err, truthValue) , which must be called with a boolean argument once it has completed. Callback arguments changed in 2.0

    Annotations
    @inline()
  17. def toString(): String

    Permalink
    Definition Classes
    Any
  18. def waterfallFuture[A](tasks: Array[_ <: Function]): Promise[A]

    Permalink

    Runs the tasks array of functions in series, each passing their results to the next in the array.

    Runs the tasks array of functions in series, each passing their results to the next in the array. However, if any of the tasks pass an error to their own callback, the next function is not executed, and the main callback is immediately called with the error.

    tasks

    An array of functions to run, each function is passed a callback(err, result1, result2, ...) it must call on completion. The first argument is an error (which can be null) and any further arguments will be passed as arguments in order to the next task.

    Annotations
    @inline()

Inherited from AnyVal

Inherited from Any

Ungrouped