Object/Trait

io.scalajs.npm.transducers

TransducersJs

Related Docs: trait TransducersJs | package transducers

Permalink

object TransducersJs extends Object with TransducersJs

Transducers-Js Singleton

Annotations
@native() @JSImport( "transducers-js" , JSImport.Namespace )
Linear Supertypes
TransducersJs, Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TransducersJs
  2. TransducersJs
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

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

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

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

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

    Permalink
    Definition Classes
    Any
  5. def cat(xf: ITransformer): ITransformer

    Permalink

    Given a transformer return a concatenating transformer

    Given a transformer return a concatenating transformer

    xf

    a transformer

    returns

    a concatenating transformer

    Definition Classes
    TransducersJs
    See also

    http://cognitect-labs.github.io/transducers-js/classes/transducers.html#methods_transducers.cat

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def comp(args: Function*): Function

    Permalink

    Function composition.

    Function composition. Take N function and return their composition.

    args

    N functions

    returns

    (Function): composition.

    Definition Classes
    TransducersJs
  8. def complement(predicate: Function): Function

    Permalink

    Take a predicate function and return its complement.

    Take a predicate function and return its complement.

    predicate

    (Function): predicate function

    returns

    (Function): the complement predicate function

    Definition Classes
    TransducersJs
  9. def completing(xf: ITransformer, cf: Function): Function

    Permalink

    A completing transducer constructor.

    A completing transducer constructor. Useful to provide cleanup logic at the end of a reduction/transduction.

    xf

    (ITransformer): a transducer

    cf

    (Function): a function to apply at the end of the reduction/transduction

    returns

    (ITransformer): a transducer

    Definition Classes
    TransducersJs
  10. def drop(n: Int): Drop

    Permalink

    A dropping transducer constructor

    A dropping transducer constructor

    n

    an integer, the number of inputs to drop.

    returns

    a dropping transducer

    Definition Classes
    TransducersJs
  11. def dropWhile(predicate: Function): DropWhile

    Permalink

    A dropping transducer that drop inputs as long as pred is true.

    A dropping transducer that drop inputs as long as pred is true.

    predicate

    a predicate function

    returns

    a dropWhile transducer

    Definition Classes
    TransducersJs
  12. def ensureReduced(value: Any): IReduced

    Permalink

    Ensure that a value is reduced.

    Ensure that a value is reduced. If already reduced will not re-wrap.

    value

    any JavaScript value

    returns

    a reduced value.

    Definition Classes
    TransducersJs
  13. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  15. def filter(predicate: Function): Filter

    Permalink

    Filtering transducer constructor

    Filtering transducer constructor

    predicate

    a predicate function

    returns

    a filtering transducer

    Definition Classes
    TransducersJs
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def first(): ITransformer

    Permalink

    A transformer which simply returns the first input.

    A transformer which simply returns the first input.

    returns

    a transducer transformer

    Definition Classes
    TransducersJs
  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  21. def identity(value: Any): Any

    Permalink

    Identity function.

    Identity function.

    value

    vany JavaScript value

    returns

    a JavaScript value

    Definition Classes
    TransducersJs
  22. def into(empty: |[String, Any], xf: ITransformer, coll: Any): Any

    Permalink

    Reduce a value into the given empty value using a transducer.

    Reduce a value into the given empty value using a transducer.

    empty

    (String | Array | Object): a JavaScript collection

    xf

    a transducer

    coll

    (Object): any iterable JavaScript value: array, string, object, or iterable.

    returns

    a JavaScript value.

    Definition Classes
    TransducersJs
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  25. def isReduced(value: Any): Boolean

    Permalink

    Check if a value is reduced.

    Check if a value is reduced.

    value

    (Object): any JavaScript value

    returns

    true if the value is an instance of transducers.Reduced false otherwise

    Definition Classes
    TransducersJs
    See also

    http://cognitect-labs.github.io/transducers-js/classes/transducers.html#methods_transducers.isReduced

  26. def keep(f: Function): Keep

    Permalink

    A keeping transducer.

    A keeping transducer. Keep inputs as long as the provided function does not return null or undefined.

    f

    a function

    returns

    a keep transducer

    Definition Classes
    TransducersJs
  27. def keepIndexed(f: Function): KeepIndexed

    Permalink

    Like keep but the provided function will be passed the index as the second argument.

    Like keep but the provided function will be passed the index as the second argument.

    f

    a function

    returns

    a keep-indexed transducer

    Definition Classes
    TransducersJs
  28. def map(f: Function): Map

    Permalink

    Mapping transducer constructor

    Mapping transducer constructor

    f

    a function

    returns

    a mapping transducer

    Definition Classes
    TransducersJs
  29. def mapcat(f: Function): ITransformer

    Permalink

    A mapping concatenating transformer

    A mapping concatenating transformer

    f

    a function

    returns

    a mapping concatenating transducer

    Definition Classes
    TransducersJs
  30. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. def partitionAll(n: Int): PartitionAll

    Permalink

    A partitioning transducer.

    A partitioning transducer. Collects inputs into arrays of size N.

    n

    an integer

    returns

    a partitionAll transducer

    Definition Classes
    TransducersJs
  34. def partitionBy(f: Function): Any

    Permalink

    A partitioning transducer.

    A partitioning transducer. Collects inputs into arrays as long as predicate remains true for contiguous inputs.

    f

    a partition function. When the result for an input changes from the previous result will create a partition.

    returns

    a partitionBy transducer

    Definition Classes
    TransducersJs
  35. def preservingReduced(xf: ITransformer): ITransformer

    Permalink

    Given a transformer returns a transformer which preserves reduced by wrapping one more time.

    Given a transformer returns a transformer which preserves reduced by wrapping one more time. See cat.

    xf

    a transformer

    returns

    a transformer which preserves reduced

    Definition Classes
    TransducersJs
  36. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  37. def reduce(xf: |[ITransformer, Function], init: Any, coll: |[String, Any]): ITransformer

    Permalink

    Given a transducer, an intial value and a collection - returns the reduction.

    Given a transducer, an intial value and a collection - returns the reduction.

    xf

    (ITransformer | Function): a transducer or two-arity function

    init

    (Object): any JavaScript value

    coll

    (String | Array | Object): any iterable JavaScript value

    returns

    (Object): an iterable JavaScript value: string, array iterable, or object.

    Definition Classes
    TransducersJs
  38. def reduced(value: Any): IReduced

    Permalink

    Return a reduced value.

    Return a reduced value. Reduced values short circuit transduce.

    value

    (Object): any JavaScript value

    returns

    (IReduced): a reduced value

    Definition Classes
    TransducersJs
  39. def remove(predicate: Function): Filter

    Permalink

    Similar to filter except the predicate is used to eliminate values.

    Similar to filter except the predicate is used to eliminate values.

    predicate

    (Function): a predicate function

    returns

    (Filter): a removing transducer

    Definition Classes
    TransducersJs
  40. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  41. def take(n: Int): Take

    Permalink

    A take transducer constructor.

    A take transducer constructor. Will take n values before returning a reduced result.

    n

    the number of inputs to receive.

    returns

    a take transducer

    Definition Classes
    TransducersJs
  42. def takeNth(n: Int): TakeNth

    Permalink

    A transducer that takes every Nth input

    A transducer that takes every Nth input

    n

    an integer

    returns

    a takeNth transducer

    Definition Classes
    TransducersJs
  43. def takeWhile(predicate: Function): TakeWhile

    Permalink

    Like the take transducer except takes as long as the pred return true for inputs.

    Like the take transducer except takes as long as the pred return true for inputs.

    predicate

    (Function): a predicate function

    returns

    a takeWhile transducer

    Definition Classes
    TransducersJs
  44. def toFn(xf: ITransformer, builder: Function): Function

    Permalink

    Convert a transducer transformer object into a function so that it can be used with existing reduce implementation i.e.

    Convert a transducer transformer object into a function so that it can be used with existing reduce implementation i.e. native, Underscore, lodash

    xf

    a transducer

    builder

    a function which take the accumulator and the the next input and return a new accumulator value.

    returns

    a two-arity function compatible with existing reduce implementations

    Definition Classes
    TransducersJs
  45. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  46. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  47. def transduce(xf: ITransformer, f: |[ITransformer, Function], init: Any, coll: |[String, Any]): Any

    Permalink

    Given a transducer, a builder function, an initial value and a iterable collection - returns the reduction.

    Given a transducer, a builder function, an initial value and a iterable collection - returns the reduction. collection - returns the reduction.

    xf

    a transducer

    f

    (ITransformer | Function): a transducer or two-arity function

    init

    any JavaScript value

    coll

    (String | Array | Object): any iterable JavaScript value

    returns

    a JavaScript value.

    Definition Classes
    TransducersJs
  48. def unreduced(value: Any): Any

    Permalink

    Ensure a value is not reduced.

    Ensure a value is not reduced. Unwraps if reduced.

    value

    any JavaScript value

    returns

    a JavaScript value

    Definition Classes
    TransducersJs
  49. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  50. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. def wrap(stepFn: Function): Wrap

    Permalink

    Take a two-arity reducing function where the first argument is the accumluation and the second argument is the next input and convert it into a transducer transformer object.

    Take a two-arity reducing function where the first argument is the accumluation and the second argument is the next input and convert it into a transducer transformer object.

    stepFn

    a two-arity reducing function

    returns

    a transducer transformer object

    Definition Classes
    TransducersJs

Inherited from TransducersJs

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped