Nutrient Web SDK
    Preparing search index...
    • Create a new immutable List containing the values of the provided collection-like.

      Note: List is a factory function and not a class, and does not use the new keyword during construction.

      const { List, Set } = require('immutable')

      const emptyList = List()
      // List []

      const plainArray = [ 1, 2, 3, 4 ]
      const listFromPlainArray = List(plainArray)
      // List [ 1, 2, 3, 4 ]

      const plainSet = Set([ 1, 2, 3, 4 ])
      const listFromPlainSet = List(plainSet)
      // List [ 1, 2, 3, 4 ]

      const arrayIterator = plainArray[Symbol.iterator]()
      const listFromCollectionArray = List(arrayIterator)
      // List [ 1, 2, 3, 4 ]

      listFromPlainArray.equals(listFromCollectionArray) // true
      listFromPlainSet.equals(listFromCollectionArray) // true
      listFromPlainSet.equals(listFromPlainArray) // true

      Returns NutrientViewer.Immutable.List<any>

    • Create a new immutable List containing the values of the provided collection-like.

      Note: List is a factory function and not a class, and does not use the new keyword during construction.

      const { List, Set } = require('immutable')

      const emptyList = List()
      // List []

      const plainArray = [ 1, 2, 3, 4 ]
      const listFromPlainArray = List(plainArray)
      // List [ 1, 2, 3, 4 ]

      const plainSet = Set([ 1, 2, 3, 4 ])
      const listFromPlainSet = List(plainSet)
      // List [ 1, 2, 3, 4 ]

      const arrayIterator = plainArray[Symbol.iterator]()
      const listFromCollectionArray = List(arrayIterator)
      // List [ 1, 2, 3, 4 ]

      listFromPlainArray.equals(listFromCollectionArray) // true
      listFromPlainSet.equals(listFromCollectionArray) // true
      listFromPlainSet.equals(listFromPlainArray) // true

      Type Parameters

      • T

      Returns NutrientViewer.Immutable.List<T>

    • Create a new immutable List containing the values of the provided collection-like.

      Note: List is a factory function and not a class, and does not use the new keyword during construction.

      const { List, Set } = require('immutable')

      const emptyList = List()
      // List []

      const plainArray = [ 1, 2, 3, 4 ]
      const listFromPlainArray = List(plainArray)
      // List [ 1, 2, 3, 4 ]

      const plainSet = Set([ 1, 2, 3, 4 ])
      const listFromPlainSet = List(plainSet)
      // List [ 1, 2, 3, 4 ]

      const arrayIterator = plainArray[Symbol.iterator]()
      const listFromCollectionArray = List(arrayIterator)
      // List [ 1, 2, 3, 4 ]

      listFromPlainArray.equals(listFromCollectionArray) // true
      listFromPlainSet.equals(listFromCollectionArray) // true
      listFromPlainSet.equals(listFromPlainArray) // true

      Type Parameters

      • T

      Parameters

      Returns NutrientViewer.Immutable.List<T>