source: trip-planner-front/node_modules/postcss-selector-parser/dist/util/ensureObject.js@ b738035

Last change on this file since b738035 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
3exports.__esModule = true;
4exports["default"] = ensureObject;
5
6function 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
22module.exports = exports.default;
Note: See TracBrowser for help on using the repository browser.