Socket
Socket
Sign inDemoInstall

@hookstate/validation

Package Overview
Dependencies
7
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.3 to 1.0.4

10

dist/index.es.js

@@ -8,5 +8,5 @@ var PluginID = Symbol('Validate');

// same as Array.from(Object.values()) but does not require ES6.
ValidationPluginInstance.prototype.arrayFromObjectValues = function (obj) {
return Object.keys(obj).map(function (key) { return obj[key]; });
};
// arrayFromObjectValues(obj: object) {
// return Object.keys(obj).map(key => obj[key])
// }
ValidationPluginInstance.prototype.getRulesAndNested = function (path) {

@@ -20,3 +20,3 @@ var result = this.storeRules;

});
return [result && result[PluginID] ? this.arrayFromObjectValues(result[PluginID]) : [],
return [result && result[PluginID] ? Array.from(Object.values(result[PluginID])) : [],
result ? Object.keys(result) : []];

@@ -85,3 +85,3 @@ };

// if any rules are defined
if (nestedRulesKeys[0] === '*') {
if (nestedRulesKeys.includes('*')) {
for (var i = 0; i < nestedInst.length; i += 1) {

@@ -88,0 +88,0 @@ var n = nestedInst[i];

@@ -12,5 +12,5 @@ 'use strict';

// same as Array.from(Object.values()) but does not require ES6.
ValidationPluginInstance.prototype.arrayFromObjectValues = function (obj) {
return Object.keys(obj).map(function (key) { return obj[key]; });
};
// arrayFromObjectValues(obj: object) {
// return Object.keys(obj).map(key => obj[key])
// }
ValidationPluginInstance.prototype.getRulesAndNested = function (path) {

@@ -24,3 +24,3 @@ var result = this.storeRules;

});
return [result && result[PluginID] ? this.arrayFromObjectValues(result[PluginID]) : [],
return [result && result[PluginID] ? Array.from(Object.values(result[PluginID])) : [],
result ? Object.keys(result) : []];

@@ -89,3 +89,3 @@ };

// if any rules are defined
if (nestedRulesKeys[0] === '*') {
if (nestedRulesKeys.includes('*')) {
for (var i = 0; i < nestedInst.length; i += 1) {

@@ -92,0 +92,0 @@ var n = nestedInst[i];

{
"name": "@hookstate/validation",
"version": "1.0.3",
"version": "1.0.4",
"description": "Plugin for @hookstate/core to enable validation of data state.",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc