Sha256: a287c3a1b58de1c2a21033217a5b6ad60c023f5e7dcf403e9fb9fc86a8edcad6

Contents?: true

Size: 264 Bytes

Versions: 4

Compression:

Stored size: 264 Bytes

Contents

class Trix.ObjectMap extends Trix.BasicObject
  constructor: (objects = []) ->
    @objects = {}
    for object in objects
      hash = JSON.stringify(object)
      @objects[hash] ?= object

  find: (object) ->
    hash = JSON.stringify(object)
    @objects[hash]

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vapid-0.1.3 lib/vapid/vendor/trix/src/trix/core/collections/object_map.coffee
vapid-0.1.2 lib/vapid/vendor/trix/src/trix/core/collections/object_map.coffee
vapid-0.1.1 lib/vapid/vendor/trix/src/trix/core/collections/object_map.coffee
vapid-0.1.0 lib/vapid/vendor/trix/src/trix/core/collections/object_map.coffee