How to use the @swim/util.Objects.equal function in @swim/util

To help you get started, we’ve selected a few @swim/util examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github swimos / swim / swim-js / swim-ui-js / @swim / view / main / member / MemberAnimator.ts View on Github external
MemberAnimator.prototype.update = function (this: MemberAnimator,
                                                                            newValue: T, oldValue: T): void {
    if (!Objects.equal(oldValue, newValue)) {
      this.setDirty(true);
    }
  };
github swimos / swim / swim-system-js / swim-ui-js / @swim / view / main / attribute / AttributeAnimator.ts View on Github external
AttributeAnimator.prototype.update = function (this: AttributeAnimator,
                                                                              newValue: T, oldValue: T): void {
    if (!Objects.equal(oldValue, newValue)) {
      this.willUpdate(newValue, oldValue);
      this._view.setAttribute(this._name, newValue);
      this.didUpdate(newValue, oldValue);
    }
  };
github swimos / swim / swim-system-js / swim-ui-js / @swim / view / main / style / StyleAnimator.ts View on Github external
StyleAnimator.prototype.update = function (this: StyleAnimator,
                                                                          newValue: T, oldValue: T): void {
    if (!Objects.equal(oldValue, newValue)) {
      this.willUpdate(newValue, oldValue);
      const names = this._names;
      if (typeof names === "string") {
        this._view.setStyle(names, newValue, this.priority);
      } else {
        for (let i = 0, n = names.length; i < n; i += 1) {
          this._view.setStyle(names[i], newValue, this.priority);
        }
      }
      this.didUpdate(newValue, oldValue);
    }
  };
github swimos / swim / swim-js / swim-ui-js / @swim / view / main / attribute / AttributeAnimator.ts View on Github external
AttributeAnimator.prototype.update = function (this: AttributeAnimator,
                                                                              newValue: T, oldValue: T): void {
    if (!Objects.equal(oldValue, newValue)) {
      this.willUpdate(newValue, oldValue);
      this._view.setAttribute(this._name, newValue);
      this.didUpdate(newValue, oldValue);
    }
  };
github swimos / swim / swim-js / swim-ui-js / @swim / view / main / style / StyleAnimator.ts View on Github external
StyleAnimator.prototype.update = function (this: StyleAnimator,
                                                                          newValue: T, oldValue: T): void {
    if (!Objects.equal(oldValue, newValue)) {
      this.willUpdate(newValue, oldValue);
      const names = this._names;
      if (typeof names === "string") {
        this._view.setStyle(names, newValue, this.priority);
      } else {
        for (let i = 0, n = names.length; i < n; i += 1) {
          this._view.setStyle(names[i], newValue, this.priority);
        }
      }
      this.didUpdate(newValue, oldValue);
    }
  };

@swim/util

Ordering, equality, and hashing; type conversions; iterators; builders; maps; caches; and assertions

Apache-2.0
Latest version published 3 years ago

Package Health Score

58 / 100
Full package analysis

Similar packages