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

cerebral-module-ui-driver

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cerebral-module-ui-driver - npm Package Compare versions

Comparing version 0.6.2 to 0.6.3

13

lib/bindings/input.js

@@ -26,4 +26,3 @@ 'use strict';

var field = formModule.meta.form && formModule.meta.form.fields && formModule.meta.form.fields[fieldName] || {};
var formattedValue = noFormatting ? formValue : format(formValue, driverModule.meta.options.formatters[field.type]);
var value = useInputValue ? meta.value : formattedValue;
var value = useInputValue ? meta.value : noFormatting ? formValue : format(formValue, driverModule.meta.options.formatters[field.type]);

@@ -33,3 +32,3 @@ // if the field is not formatted then it should't be cast

return Object.assign((_Object$assign = {}, _defineProperty(_Object$assign, propsMap['value'], value), _defineProperty(_Object$assign, propsMap['isError'], !!meta.error), _defineProperty(_Object$assign, propsMap['isValidating'], !!meta.isValidating), _defineProperty(_Object$assign, propsMap['message'], !meta.error && useInputValue && formattedValue !== value ? formattedValue : meta.error), _defineProperty(_Object$assign, propsMap['onChange'], function (e) {
return Object.assign((_Object$assign = {}, _defineProperty(_Object$assign, propsMap['value'], value), _defineProperty(_Object$assign, propsMap['isError'], !!meta.error), _defineProperty(_Object$assign, propsMap['isValidating'], !!meta.isValidating), _defineProperty(_Object$assign, propsMap['message'], meta.error), _defineProperty(_Object$assign, propsMap['onChange'], function (e) {
driverModule.meta.signals.valueChanged({

@@ -58,9 +57,3 @@ moduleName: formModule.name,

function format(value, formatter) {
if (typeof formatter === 'function') {
return formatter(value);
}
if (typeof value !== 'string') {
return typeof value !== 'undefined' && value !== null ? '' : '' + value;
}
return value;
return typeof formatter === 'function' ? formatter(value) : value === undefined || value === null ? '' : '' + value;
}
{
"name": "cerebral-module-ui-driver",
"version": "0.6.2",
"version": "0.6.3",
"description": "A driver for connecting ui components to cerebral",

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