Last change
on this file since ceaed42 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
436 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | exports.__esModule = true;
|
---|
4 | exports["default"] = ensureObject;
|
---|
5 |
|
---|
6 | function ensureObject(obj) {
|
---|
7 | for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
---|
8 | props[_key - 1] = arguments[_key];
|
---|
9 | }
|
---|
10 |
|
---|
11 | while (props.length > 0) {
|
---|
12 | var prop = props.shift();
|
---|
13 |
|
---|
14 | if (!obj[prop]) {
|
---|
15 | obj[prop] = {};
|
---|
16 | }
|
---|
17 |
|
---|
18 | obj = obj[prop];
|
---|
19 | }
|
---|
20 | }
|
---|
21 |
|
---|
22 | module.exports = exports.default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.