init config by window.
This commit is contained in:
parent
7be6baae7a
commit
897283418a
3 changed files with 53 additions and 39 deletions
15
src/util.js
15
src/util.js
|
|
@ -139,3 +139,18 @@ export function slugify (string) {
|
|||
slugify.clear = function () {
|
||||
slugify.occurrences = {}
|
||||
}
|
||||
|
||||
const hasOwnProperty = Object.prototype.hasOwnProperty
|
||||
export const merge = Object.assign || function (to) {
|
||||
for (let i = 1; i < arguments.length; i++) {
|
||||
const from = Object(arguments[i])
|
||||
|
||||
for (const key in from) {
|
||||
if (hasOwnProperty.call(from, key)) {
|
||||
to[key] = from[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return to
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue