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

react-bsonschema-form

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-bsonschema-form - npm Package Compare versions

Comparing version 0.41.4 to 0.41.5

26

lib/validate.js

@@ -37,18 +37,18 @@ "use strict";

var reEscapeChar = /\\(\\)?/g;
var reLeadingDot = /^\./;
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
function errorPropertyToPath(property) {
// Parse array indices, eg. "instance.level1.level2[2].level3"
// => ["instance", "level1", "level2", 2, "level3"]
return property.split(".").reduce(function (path, node) {
var match = node.match(RE_ERROR_ARRAY_PATH);
if (match) {
var nodeName = node.slice(0, node.indexOf("["));
var indices = match.map(function (str) {
return parseInt(str.slice(1, -1), 10);
});
path = path.concat(nodeName, indices);
} else {
path.push(node);
}
return path;
}, []);
// copied from lodash https://github.com/lodash/lodash/blob/4.17.1/lodash.js#L6744
var result = [];
if (reLeadingDot.test(property)) {
result.push('');
}
property.replace(rePropName, function (match, number, quote, string) {
result.push(quote ? string.replace(reEscapeChar, '$1') : number || match);
});
return result;
}

@@ -55,0 +55,0 @@

{
"name": "react-bsonschema-form",
"version": "0.41.4",
"version": "0.41.5",
"description": "A simple React component capable of building HTML forms out of a JSON schema.",

@@ -5,0 +5,0 @@ "scripts": {

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