How to use the deepmerge.default function in deepmerge

To help you get started, we’ve selected a few deepmerge 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 haiwen / seahub / frontend / src / lib / seafile-markdown2html.js View on Github external
function stringify(config) {
  var settings = xtend(config, this.data('settings'));
  var schema = deepmerge(gh, {
    "attributes":{
      "input": [
        "type",
      ],
      "li": [
        "className"
      ],
    },
    "tagNames": [
      "input"
    ]
  });
  this.Compiler = compiler;

  function compiler(tree) {
    // use sanity to remove dangerous html, the default is
github luisgustavolf / react-satisfying-forms / dev / src / react-satisfying-forms-staless / helpers / valuesHelper.ts View on Github external
export function getFormValuesWithDefaults(formValues?: IFormValues): IFormValues {
    const defaults:IFormValues = {
        fields: {
            infos: {},
            values: {} as any
        },
        form: { }
    }
    
    return DeepMerge.default(defaults, formValues || {})
}
github luisgustavolf / react-satisfying-forms / dev / src / react-satisfying-forms-staless / helpers / valuesHelper.ts View on Github external
export function setFieldInfo(formValues:IFormValues, fieldName: string, status: FieldInfoTypes, value: any): IFormValues {
    const values = formValues || getFormValuesWithDefaults();
    const overwriteMerge = (destinationArray: any[], sourceArray: any[], options: DeepMerge.Options) => sourceArray

    return DeepMerge.default(values, { 
        fields: {
            infos: {
                [fieldName]: {
                    [status]: value
                }        
            }
        }
    }, { 
        arrayMerge: overwriteMerge
    })
}
github Tarnadas / net64plus / src / renderer / components / buttons / SMMButton.tsx View on Github external
height: '100%'
        },
        text: {
          color: enabled
            ? hover
              ? '#fff'
              : '#323245'
            : '#fff',
          float: 'left',
          width: 'auto',
          paddingRight: '5px'
        }
      }
    }
    if (this.props.styles) {
      styles = deepMerge(styles, this.props.styles)
    }
    const iconStyle: React.CSSProperties = Object.assign({},
      styles.icon,
      this.props.iconStyle === 'dark'
        ? { backgroundColor: 'rgb(50, 50, 69)' }
        : {},
      enabled
        ? hover
          ? this.props.iconStyle === 'dark'
            ? { backgroundColor: '#000' }
            : {}
          : {}
        : { backgroundColor: '#666' }
    )
    return (
github haiwen / seahub / frontend / src / utils / seafile-markdown2html.js View on Github external
function stringify(config) {
  var settings = xtend(config, this.data('settings'));
  var schema = deepmerge(gh, {
    'attributes': {
      'input': [
        'type',
      ],
      'li': [
        'className'
      ],
      'code': [
        'className',
      ],
    },
    'tagNames': [
      'input',
      'code'
    ]
  });

deepmerge

A library for deep (recursive) merging of Javascript objects

MIT
Latest version published 2 years ago

Package Health Score

73 / 100
Full package analysis