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

@ot06/be-utils

Package Overview
Dependencies
Maintainers
3
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ot06/be-utils - npm Package Compare versions

Comparing version 0.0.26 to 0.0.27

29

dist/expressMiddlewares/RouteHandler.js

@@ -12,2 +12,6 @@ 'use strict';

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

@@ -19,6 +23,2 @@

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
var DEFAULT_CONFIG = {

@@ -30,3 +30,18 @@ routes: {}

constructor(config) {
this.routesConfig = _lodash.default.merge(DEFAULT_CONFIG, config);
// Merge Config with Default Config
var mergedConfig = _lodash.default.merge(DEFAULT_CONFIG, config); // Generate Routes Hashmap
var {
routes = []
} = mergedConfig;
var routesMap = _lodash.default.keyBy(routes, 'routeId'); // Build Routes Config
var routesConfig = _objectSpread(_objectSpread({}, mergedConfig), {}, {
routesMap
});
this.routesConfig = routesConfig;
this.enableRoute = this.enableRoute.bind(this);

@@ -78,5 +93,5 @@ }

var {
routes = {}
routesMap = {}
} = this.routesConfig;
var thisRouteConfig = routes[route] || {};
var thisRouteConfig = routesMap[route] || {};
var {

@@ -83,0 +98,0 @@ enabled = false

{
"name": "@ot06/be-utils",
"version": "0.0.26",
"version": "0.0.27",
"description": "Backend Utilities Module",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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