webflow-api 0.8.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,54 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = exports.buildRequiredArgError = void 0;
9
-
10
- var _es6Error = _interopRequireDefault(require("es6-error"));
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
-
14
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
15
-
16
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
17
-
18
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19
-
20
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
21
-
22
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
23
-
24
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
25
-
26
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
27
-
28
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
29
-
30
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
31
-
32
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
33
-
34
- var WebflowError = /*#__PURE__*/function (_ExtendableError) {
35
- _inherits(WebflowError, _ExtendableError);
36
-
37
- var _super = _createSuper(WebflowError);
38
-
39
- function WebflowError() {
40
- _classCallCheck(this, WebflowError);
41
-
42
- return _super.apply(this, arguments);
43
- }
44
-
45
- return _createClass(WebflowError);
46
- }(_es6Error["default"]);
47
-
48
- exports["default"] = WebflowError;
49
-
50
- var buildRequiredArgError = function buildRequiredArgError(name) {
51
- return new WebflowError("Argument '".concat(name, "' is required but was not present"));
52
- };
53
-
54
- exports.buildRequiredArgError = buildRequiredArgError;
package/dist/utils.js DELETED
@@ -1,29 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.pick = exports.isObjectEmpty = void 0;
7
-
8
- var isObjectEmpty = function isObjectEmpty(obj) {
9
- return Object.keys(obj).length === 0;
10
- };
11
-
12
- exports.isObjectEmpty = isObjectEmpty;
13
-
14
- var pick = function pick(obj) {
15
- var picked = {};
16
-
17
- for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
18
- props[_key - 1] = arguments[_key];
19
- }
20
-
21
- props.forEach(function (prop) {
22
- if (obj[prop] !== undefined) {
23
- picked[prop] = obj[prop];
24
- }
25
- });
26
- return picked;
27
- };
28
-
29
- exports.pick = pick;
@@ -1,5 +0,0 @@
1
- import ExtendableError from "es6-error";
2
-
3
- export default class WebflowError extends ExtendableError {}
4
-
5
- export const buildRequiredArgError = (name) => new WebflowError(`Argument '${name}' is required but was not present`);
package/src/utils.js DELETED
@@ -1,13 +0,0 @@
1
- export const isObjectEmpty = (obj) => Object.keys(obj).length === 0;
2
-
3
- export const pick = (obj, ...props) => {
4
- const picked = {};
5
-
6
- props.forEach((prop) => {
7
- if (obj[prop] !== undefined) {
8
- picked[prop] = obj[prop];
9
- }
10
- });
11
-
12
- return picked;
13
- };