Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pagedip/lib-app

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pagedip/lib-app - npm Package Compare versions

Comparing version 2.1.4 to 2.1.5

34

lib/index.js

@@ -1,2 +0,3 @@

/* eslint-disable */"use strict";
/* eslint-disable */
"use strict";

@@ -14,6 +15,4 @@ Object.defineProperty(exports, "__esModule", {

var _utilMergePlainObjects = require("@pagedip/util-merge-plain-objects");
var _utilMergePlainObjects = _interopRequireDefault(require("@pagedip/util-merge-plain-objects"));
var _utilMergePlainObjects2 = _interopRequireDefault(_utilMergePlainObjects);
var _lodash = require("lodash");

@@ -25,2 +24,3 @@

_libObserver.Observer.call(this);
(0, _utilPropHelpers.immutable)(this, "configs", []);

@@ -65,3 +65,3 @@ this.defaults(defaults);

if (error == null) {
error = new App.AssertError("app is missing required property '" + prop + "'");
error = new App.AssertError("app is missing required property '".concat(prop, "'"));
} else if (!(error instanceof Error)) {

@@ -80,3 +80,3 @@ error = new App.AssertError(error);

return this.configs.reduce(function (m, c) {
return (0, _utilMergePlainObjects2.default)(m, c.options);
return (0, _utilMergePlainObjects.default)(m, c.options);
}, {});

@@ -87,3 +87,2 @@ },

},
configurable: false,

@@ -99,7 +98,10 @@ enumerable: true

var index = Infinity;
if (typeof after === "string") {
var afterIndex = this.getConfigIndex(after);
if (afterIndex < 0) {
throw new Error("No existing config named '" + after + "'");
throw new Error("No existing config named '".concat(after, "'"));
}
index = afterIndex + 1;

@@ -120,7 +122,8 @@ } else if (typeof after === "number") {

if (existing >= 0) this.configs.splice(existing, 1);
var config = { name: name, options: options };
var config = {
name: name,
options: options
};
this.configs.splice(index, 0, config);
this.emit("config", config, index);
return this;

@@ -167,3 +170,3 @@ };

var val = this.reduceConfigs(key, _utilMergePlainObjects2.default, void 0);
var val = this.reduceConfigs(key, _utilMergePlainObjects.default, void 0);
return typeof val === "undefined" ? def : val;

@@ -175,3 +178,3 @@ };

for (var _len = arguments.length, keys = Array(_len), _key = 0; _key < _len; _key++) {
for (var _len = arguments.length, keys = new Array(_len), _key = 0; _key < _len; _key++) {
keys[_key] = arguments[_key];

@@ -185,10 +188,9 @@ }

var result = {};
keys.forEach(function (key) {
result[key] = _this3.getOption(key);
});
return result;
};
module.exports = exports.default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJBcHAiLCJkZWZhdWx0cyIsIk9ic2VydmVyIiwiY2FsbCIsInByb3RvdHlwZSIsIk9iamVjdCIsImNyZWF0ZSIsImlzQXBwIiwiYXBwIiwiZGVmaW5lUHJvcGVydHkiLCJ2YWx1ZSIsIndyaXRlYWJsZSIsImNvbmZpZ3VyYWJsZSIsImVudW1lcmFibGUiLCJ1c2UiLCJmbiIsIkFycmF5IiwiaXNBcnJheSIsImZvckVhY2giLCJmIiwiciIsIkVycm9yIiwiQXNzZXJ0RXJyb3IiLCJhc3NlcnQiLCJwcm9wIiwiZXJyb3IiLCJnZXQiLCJjb25maWdzIiwicmVkdWNlIiwibSIsImMiLCJvcHRpb25zIiwic2V0IiwiY29uZmlnIiwibmFtZSIsImFmdGVyIiwiaW5kZXgiLCJJbmZpbml0eSIsImFmdGVySW5kZXgiLCJnZXRDb25maWdJbmRleCIsImlzTmFOIiwibGVuZ3RoIiwiZXhpc3RpbmciLCJzcGxpY2UiLCJlbWl0IiwiYXNzaWduIiwiZ2V0Q29uZmlnIiwiZmluZEluZGV4IiwicmVkdWNlQ29uZmlncyIsImtleSIsIm1lbW8iLCJpIiwib3B0IiwiZ2V0T3B0aW9uIiwiZGVmIiwidmFsIiwibWVyZ2UiLCJwaWNrT3B0aW9ucyIsImtleXMiLCJyZXN1bHQiXSwibWFwcGluZ3MiOiI7Ozs7O2tCQU13QkEsRzs7QU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a2V5LCBtZXJnZSwgdm9pZCAwKTtcbiAgcmV0dXJuIHR5cGVvZiB2YWwgPT09IFwidW5kZWZpbmVkXCIgPyBkZWYgOiB2YWw7XG59O1xuXG5BcHAucHJvdG90eXBlLnBpY2tPcHRpb25zID0gZnVuY3Rpb24oLi4ua2V5cykge1xuICBpZiAoa2V5cy5sZW5ndGggPT09IDEgJiYgQXJyYXkuaXNBcnJheShrZXlzWzBdKSkge1xuICAgIGtleXMgPSBrZXlzWzBdO1xuICB9XG5cbiAgY29uc3QgcmVzdWx0ID0ge307XG5cbiAga2V5cy5mb3JFYWNoKGtleSA9PiB7XG4gICAgcmVzdWx0W2tleV0gPSB0aGlzLmdldE9wdGlvbihrZXkpO1xuICB9KTtcblxuICByZXR1cm4gcmVzdWx0O1xufTtcbiJdfQ==
{
"name": "@pagedip/lib-app",
"version": "2.1.4",
"version": "2.1.5",
"repository": {

@@ -18,9 +18,9 @@ "type": "git",

"@pagedip/lib-observer": "^2.1.1",
"@pagedip/util-error": "^2.0.8",
"@pagedip/util-error": "^2.0.9",
"@pagedip/util-merge-plain-objects": "^2.1.0",
"@pagedip/util-prop-helpers": "^1.2.0",
"lodash": "^4.17.10"
"lodash": "^4.17.11"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"@babel/cli": "^7.1.0",
"npm-run-all": "^4.1.3",

@@ -33,3 +33,3 @@ "shx": "^0.3.2"

],
"gitHead": "951123f4da5fbab6785eca9060bee18e8fe44d16"
"gitHead": "d96db324b0474222fbe0beb212eebbbc7851b4fa"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc