How to use the arr-diff function in arr-diff

To help you get started, we’ve selected a few arr-diff 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 hjkcai / vue-modal-dialogs / dist / index.js View on Github external
} else if (isVueComponent(options.component)) {
    props = options.props
    component = options.component
  } else {
    if (debug) { console.error('[vue-modal-dialogs] No Vue component specified') }

  // Dialog component and props
  var dialogConfig = {
    props: props,

    // Inject a `$close` function and pre-defined props into dialog component
    component: Vue.extend({
      extends: component,
      props: diff(['dialogId', 'arguments' ].concat( props), Object.keys(component.props || [])),
      methods: {
        $close: function $close (data) {
          this.$emit('vue-modal-dialogs:close', data)

  // Return dialog function
  return function dialogFunction () {
    var args = [], len = arguments.length;
    while ( len-- ) args[ len ] = arguments[ len ];

    if (dialogsWrapper) {
      // Add dialog component into dialogsWrapper component
      return dialogsWrapper.add(dialogConfig, args)


Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.

Latest version published 7 years ago

Package Health Score

68 / 100
Full package analysis

Popular arr-diff functions