UNPKG

1.22 kBJavaScriptView Raw
1/**
2 * @license
3 * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
4 * This code may only be used under the BSD style license found at
5 * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
6 * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
7 * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
8 * Google as part of the polymer project is also subject to an additional IP
9 * rights grant found at http://polymer.github.io/PATENTS.txt
10 */
11if (!Array.from) {
12 Array.from = (object) => {
13 return [].slice.call(object);
14 };
15}
16if (!Object.assign) {
17 const assign = (target, source) => {
18 const n$ = Object.keys(source);
19 for (let i = 0; i < n$.length; i++) {
20 const p = n$[i];
21 // tslint:disable-next-line:no-any
22 target[p] = source[p];
23 }
24 };
25 Object.assign = function (target) {
26 const args = [].slice.call(arguments, 1);
27 for (var i = 0, s; i < args.length; i++) {
28 s = args[i];
29 if (s) {
30 assign(target, s);
31 }
32 }
33 return target;
34 };
35}
36//# sourceMappingURL=es6-misc.js.map
\No newline at end of file