Deprecated
Replaced by
hx.mergeDefined
hx.mergeDefined
// returns {'a': 1, 'b': 3}
hx.mergeDefined({'a': 1}, {'a': undefined}, {'b': 3})
// returns {a: {b: 2, c: {d: 4, e: 'value'}}}
hx.mergeDefined({a: {b: 2, c: {d: 3}}}, {a: {b: undefined, c: {d: 4, e: 'value'}}})
hx.shallowMergeDefined
// returns {'a': 1, 'b': 3}
hx.shallowMergeDefined({'a': 1}, {'a': undefined}, {'b': 3})
// returns {a: {b: undefined, c: {d: 4, e: "value" }}}
hx.shallowMergeDefined({a: {b: 2, c: {d: 3}}}, {a: {b: undefined, c: {d: 4, e: 'value'}}})
html
method for selections has been removed to prevent XSS attacks. html
method for selections has been removed to prevent XSS attacks. html
method for selections has been removed to prevent XSS attacks. html
method for selections has been removed to prevent XSS attacks. html
method for selections has been removed to prevent XSS attacks. html
method for selections has been removed to prevent XSS attacks. returnArray
is true. // returns {'a': 2, 'b': 3}
hx.merge({'a': 1}, {'a': 2}, {'b': 3})
// returns {a: {b: 'hello', c: {d: 4, e: 'value'}}}
hx.merge({a: {b: 2, c: {d: 3}}}, {a: {b: 'hello', c: {d: 4, e: 'value'}}})
// returns {'a': 1, 'b': 3}
hx.merge.defined({'a': 1}, {'a': undefined}, {'b': 3})
// returns {a: {b: 2, c: {d: 4, e: 'value'}}}
hx.merge.defined({a: {b: 2, c: {d: 3}}}, {a: {b: undefined, c: {d: 4, e: 'value'}}})
// returns {'a': 2, 'b': 3}
hx.shallowMerge({'a': 1}, {'a': 2}, {'b': 3})
// returns {a: {b: 'hello', c: {d: 4, e: 'value'}}}
hx.shallowMerge({a: {b: 2, c: {d: 3}}}, {a: {b: 'hello', c: {d: 4, e: 'value'}}})
// returns {'a': 1, 'b': 3}
hx.shallowMerge.defined({'a': 1}, {'a': undefined}, {'b': 3})
// returns {a: {b: undefined, c: {d: 4, e: "value" }}}
hx.shallowMerge.defined({a: {b: 2, c: {d: 3}}}, {a: {b: undefined, c: {d: 4, e: 'value'}}})
hx.isBoolean("i am a string") // returns false
hx.isBoolean({}) // returns false
hx.isBoolean(document.createElement('div')) // returns false
hx.isBoolean([]) // returns false
hx.isBoolean(123) // returns false
hx.isBoolean(function(){}) // returns false
hx.isBoolean(true) // returns true
hx.isBoolean(false) // returns true
// old way
hx.min(array, f)
// new way
hx.min(array.map(f))
hx.min([7, 6, 3, 5]) // returns 3
// old way
hx.max(array, f)
// new way
hx.max(array.map(f))
hx.max([7, 6, 3, 5]) // returns 7
// returns {'a': 2, 'b': 3}
hx.merge(false, {'a': 1}, {'a': 2}, {'b': 3})
// returns {a: {b: 'hello', c: {d: 4, e: 'value'}}}
hx.merge(true, {a: {b: 2, c: {d: 3}}}, {a: {b: 'hello', c: {d: 4, e: 'value'}}})
// returns {'a': 2, 'b': 3}
hx.merge(false, {'a': 1}, {'a': 2}, {'b': 3})
// returns {a: {b: 'hello', c: {d: 4, e: 'value'}}}
hx.merge(true, {a: {b: 2, c: {d: 3}}}, {a: {b: 'hello', c: {d: 4, e: 'value'}}})