Nutrient Web SDK
    Preparing search index...
    • Creates a new Immutable Map.

      Created with the same key value pairs as the provided Collection.Keyed or JavaScript Object or expects a Collection of [K, V] tuple entries.

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

      const { Map } = require('immutable')
      Map({ key: "value" })
      Map([ [ "key", "value" ] ])

      Keep in mind, when using JS objects to construct Immutable Maps, that JavaScript Object properties are always strings, even if written in a quote-less shorthand, while Immutable Maps accept keys of any type.

      let obj = { 1: "one" }
      Object.keys(obj) // [ "1" ]
      assert.equal(obj["1"], obj[1]) // "one" === "one"

      let map = Map(obj)
      assert.notEqual(map.get("1"), map.get(1)) // "one" !== undefined

      Property access for JavaScript Objects first converts the key to a string, but since Immutable Map keys can be of any type the argument to get() is not altered.

      Type Parameters

      • K
      • V

      Parameters

      Returns NutrientViewer.Immutable.Map<K, V>

    • Creates a new Immutable Map.

      Created with the same key value pairs as the provided Collection.Keyed or JavaScript Object or expects a Collection of [K, V] tuple entries.

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

      const { Map } = require('immutable')
      Map({ key: "value" })
      Map([ [ "key", "value" ] ])

      Keep in mind, when using JS objects to construct Immutable Maps, that JavaScript Object properties are always strings, even if written in a quote-less shorthand, while Immutable Maps accept keys of any type.

      let obj = { 1: "one" }
      Object.keys(obj) // [ "1" ]
      assert.equal(obj["1"], obj[1]) // "one" === "one"

      let map = Map(obj)
      assert.notEqual(map.get("1"), map.get(1)) // "one" !== undefined

      Property access for JavaScript Objects first converts the key to a string, but since Immutable Map keys can be of any type the argument to get() is not altered.

      Type Parameters

      • T

      Parameters

      Returns NutrientViewer.Immutable.Map<T, T>

    • Creates a new Immutable Map.

      Created with the same key value pairs as the provided Collection.Keyed or JavaScript Object or expects a Collection of [K, V] tuple entries.

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

      const { Map } = require('immutable')
      Map({ key: "value" })
      Map([ [ "key", "value" ] ])

      Keep in mind, when using JS objects to construct Immutable Maps, that JavaScript Object properties are always strings, even if written in a quote-less shorthand, while Immutable Maps accept keys of any type.

      let obj = { 1: "one" }
      Object.keys(obj) // [ "1" ]
      assert.equal(obj["1"], obj[1]) // "one" === "one"

      let map = Map(obj)
      assert.notEqual(map.get("1"), map.get(1)) // "one" !== undefined

      Property access for JavaScript Objects first converts the key to a string, but since Immutable Map keys can be of any type the argument to get() is not altered.

      Type Parameters

      • V

      Parameters

      • obj: { [key: string]: V }

      Returns NutrientViewer.Immutable.Map<string, V>

    • Creates a new Immutable Map.

      Created with the same key value pairs as the provided Collection.Keyed or JavaScript Object or expects a Collection of [K, V] tuple entries.

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

      const { Map } = require('immutable')
      Map({ key: "value" })
      Map([ [ "key", "value" ] ])

      Keep in mind, when using JS objects to construct Immutable Maps, that JavaScript Object properties are always strings, even if written in a quote-less shorthand, while Immutable Maps accept keys of any type.

      let obj = { 1: "one" }
      Object.keys(obj) // [ "1" ]
      assert.equal(obj["1"], obj[1]) // "one" === "one"

      let map = Map(obj)
      assert.notEqual(map.get("1"), map.get(1)) // "one" !== undefined

      Property access for JavaScript Objects first converts the key to a string, but since Immutable Map keys can be of any type the argument to get() is not altered.

      Type Parameters

      • K
      • V

      Returns NutrientViewer.Immutable.Map<K, V>

    • Creates a new Immutable Map.

      Created with the same key value pairs as the provided Collection.Keyed or JavaScript Object or expects a Collection of [K, V] tuple entries.

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

      const { Map } = require('immutable')
      Map({ key: "value" })
      Map([ [ "key", "value" ] ])

      Keep in mind, when using JS objects to construct Immutable Maps, that JavaScript Object properties are always strings, even if written in a quote-less shorthand, while Immutable Maps accept keys of any type.

      let obj = { 1: "one" }
      Object.keys(obj) // [ "1" ]
      assert.equal(obj["1"], obj[1]) // "one" === "one"

      let map = Map(obj)
      assert.notEqual(map.get("1"), map.get(1)) // "one" !== undefined

      Property access for JavaScript Objects first converts the key to a string, but since Immutable Map keys can be of any type the argument to get() is not altered.

      Returns NutrientViewer.Immutable.Map<any, any>