init config by window.

This commit is contained in:
qingwei.li 2017-01-04 20:47:55 +08:00
commit 897283418a
3 changed files with 53 additions and 39 deletions

View file

@ -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
}