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

@commodo/fields

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commodo/fields - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

58

fields/fields.js

@@ -74,10 +74,62 @@ "use strict";

return false;
}), (0, _repropose.withProps)(props => {
}), (0, _repropose.withProps)(instance => {
const {
setValue,
validate
} = props;
validate,
isDirty,
clean
} = instance;
return {
instanceOf,
isDirty() {
if (isDirty.call(this)) {
return true;
}
if (instance.current === null) {
return false;
}
if (instance.list) {
for (let i = 0; i < instance.current.length; i++) {
let currentElement = instance.current[i];
if (currentElement.isDirty()) {
return true;
}
}
return false;
}
return (0, _fields.hasFields)(instance.current) && instance.current.isDirty();
},
clean() {
clean.call(this);
if (instance.current === null) {
return this;
}
if (instance.list) {
for (let i = 0; i < instance.current.length; i++) {
let currentElement = instance.current[i];
if (currentElement.isDirty()) {
currentElement.clean();
}
}
return this;
}
if (instance.current.isDirty()) {
instance.current.clean();
}
return this;
},
setValue(value) {

@@ -84,0 +136,0 @@ if (value === null) {

4

package.json
{
"name": "@commodo/fields",
"version": "0.2.4",
"version": "0.2.5",
"main": "index.js",

@@ -31,3 +31,3 @@ "repository": {

},
"gitHead": "5ca5b6c976577b58f5dbed8a5ef97663df6ea004"
"gitHead": "c520a46ef8589ffdd9ce4c34583be5fd6da49671"
}

Sorry, the diff of this file is not supported yet

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