New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@storyous/common-utils

Package Overview
Dependencies
Maintainers
4
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storyous/common-utils - npm Package Compare versions

Comparing version 1.2.5 to 1.2.6

33

lib/requestValidator.js

@@ -453,2 +453,35 @@ 'use strict';

}
},
/**
*
* @param {*} value
* @param {string} fieldName
* @param {*|null} [defaultValue]
* @returns {Array|null} Or `defaultValue`
*/
commaList (value, fieldName, defaultValue) {
if (typeof value === 'string') {
// split the string
value = value.split(',');
}
if (typeof value === 'object' && value instanceof Array) {
value = value.map(el => (el.replace(/[^a-z0-9_-]+/ig, '')));
} else if (value) {
throw AppError.badRequest(`Bad field list: ${fieldName}`);
} else {
if (typeof defaultValue === 'undefined') {
defaultValue = null;
}
value = defaultValue;
}
return value;
}

@@ -455,0 +488,0 @@ };

2

package.json
{
"name": "@storyous/common-utils",
"version": "1.2.5",
"version": "1.2.6",
"description": "Common utils for storyous microservices",

@@ -5,0 +5,0 @@ "main": "lib/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