 'use strict'
 PackageConfigObserver = require 'atom-package-config-observer'
+
+equals = (obj, ref) ->
+  if obj is ref
+    return true
+  for own key, val of obj
+    if typeof val is 'object'
+      if not equals ref[key], val
+        return false
+    else if ref[key] isnt val
+      return false
+  return true
 
 class BlockCursor
   config:

    @stylesheet.sheet.insertRule """
      #{@selectorForScope scopeName} {
        #{primaryColor.property}: #{primaryColor.toRGBAString()};
        #{if pulseDuration then "transition-duration: #{pulseDuration};" else ''}
        #{if cursorThickness then "border-width: #{cursorThickness};" else ''}
      }
    """, @cssRulesIndexes[scopeName]


    primaryColor.property = secondaryColor.property = switch cursorType
      when 'block' then 'background-color'
      else 'border-color'

    # transition opacity instead of background-color to transparent
    if secondaryColor.alpha is 0
