Releases: unjs/defu
Releases Β· unjs/defu
v6.1.4
π©Ή Fixes
- Merge objects with
Module
type (#121)
π Refactors
- Move
isPlainObject
to_utils
to allow testing (e922a16) - Make
isPlainObject
logic more readable (e458b63)
π Documentation
- Fix typo (#116)
β Tests
- Improve tests for internal
isPlainObject
util (b24a213)
β€οΈ Contributors
- Alexander Lichter (@manniL)
- Pooya Parsa (@pi0)
- Yu Le [email protected]
v6.1.3
π©Ή Fixes
- Only merge plain objects (#111)
π¦ Build
- Backward compatible cjs entry (#110)
π Documentation
β€οΈ Contributors
- Pooya Parsa (@pi0)
- Abdul Al-Hasany [email protected]
- Kricsleo
- Donald Shtjefni (@dnldsht)
- SΓ©bastien Chopin [email protected]
v6.0.0
β BREAKING CHANGES
- When merging arrays, defaults are last in order:
defu(['a', 'b'], ['c', 'd'])
// With v6+
['a', 'b', 'c', 'd']
// Before
['c', 'd', 'a', 'b']
- Using named exports instead of the default export
Before:
// With v6+
import { defu } from 'defu'
const { defu } = require('defu')
// Before
import defu from 'defu'
const defu = require('defu')
Other utilities are also exported as named exports to be tree-shakable:
// instead of defu.fn
import { defuFn } from 'defu'
// Instead of defu.arrayFn
import { defuArrayFn } from 'defu'
// Instead of defu.extend
import { createDefu } from 'defu'