How to use just-compare - 8 common examples

To help you get started, we’ve selected a few just-compare 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 abpframework / abp / npm / ng-packs / packages / core / src / lib / directives / replaceable-template.directive.ts View on Github external
setDefaultComponentInputs() {
    if (!this.defaultComponentRef || (!this.data.inputs && !this.data.outputs)) return;

    if (this.data.inputs) {
      for (const key in this.data.inputs) {
        if (this.data.inputs.hasOwnProperty(key)) {
          if (!compare(this.defaultComponentRef[key], this.data.inputs[key].value)) {
            this.defaultComponentRef[key] = this.data.inputs[key].value;
          }
        }
      }
    }

    if (this.data.outputs) {
      for (const key in this.data.outputs) {
        if (this.data.outputs.hasOwnProperty(key)) {
          if (!this.defaultComponentSubscriptions[key]) {
            this.defaultComponentSubscriptions[key] = this.defaultComponentRef[key].subscribe(
              value => {
                this.data.outputs[key](value);
              },
            );
          }
github fusionjs / fusionjs / fusion-plugin-rpc / src / mock-rpc-handlers.js View on Github external
          ? responseDetails.filter(item => isEqual(item.args, args))[0].response
          : responseDetails;

just-compare

compare two collections

MIT
Latest version published 2 years ago

Package Health Score

61 / 100
Full package analysis

Popular just-compare functions