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 1.0.3-next.1 to 1.0.3-next.7

2

fields/boolean.js

@@ -27,3 +27,3 @@ "use strict";

rest = (0, _objectWithoutProperties2.default)(_ref, ["list"]);
const field = (0, _createField.default)(_objectSpread({}, rest, {
const field = (0, _createField.default)(_objectSpread(_objectSpread({}, rest), {}, {
list,

@@ -30,0 +30,0 @@ type: "boolean"

@@ -94,3 +94,3 @@ "use strict";

if (typeof this.validation === "function") {
await this.validation((await this.getValue()));
await this.validation(await this.getValue());
}

@@ -97,0 +97,0 @@ };

@@ -62,3 +62,3 @@ "use strict";

const field = (0, _createField.default)(_objectSpread({}, rest, {
const field = (0, _createField.default)(_objectSpread(_objectSpread({}, rest), {}, {
list,

@@ -65,0 +65,0 @@ type: "fields"

@@ -27,3 +27,3 @@ "use strict";

rest = (0, _objectWithoutProperties2.default)(_ref, ["list"]);
const field = (0, _createField.default)(_objectSpread({}, rest, {
const field = (0, _createField.default)(_objectSpread(_objectSpread({}, rest), {}, {
list,

@@ -30,0 +30,0 @@ type: "number"

@@ -27,3 +27,3 @@ "use strict";

rest = (0, _objectWithoutProperties2.default)(_ref, ["list"]);
let field = (0, _createField.default)(_objectSpread({}, rest, {
let field = (0, _createField.default)(_objectSpread(_objectSpread({}, rest), {}, {
list,

@@ -30,0 +30,0 @@ type: "string"

@@ -10,2 +10,6 @@ "use strict";

function isPromise(value) {
return Boolean(value && typeof value.then === "function");
}
const onSet = callback => {

@@ -18,3 +22,9 @@ return (0, _repropose.withProps)(props => {

setValue(value) {
return setValue.call(this, callback(value));
const newValue = callback(value);
if (isPromise(newValue)) {
throw new Error(`A promise was returned from the "onSet" callback (applied on the "${props.name}" field). Provided callbacks cannot perform async operations.`);
}
return setValue.call(this, newValue);
}

@@ -21,0 +31,0 @@

{
"name": "@commodo/fields",
"version": "1.0.3-next.1",
"version": "1.0.3-next.7",
"main": "index.js",

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

},
"gitHead": "b1f1826e2285e793fe5ea47a26b429e1e3c54001"
"gitHead": "6046b882b2d50608a7e970fc052ee67dd8718073"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc