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

alt-form

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alt-form - npm Package Compare versions

Comparing version 3.0.0 to 4.0.0

42

lib/altForm.js

@@ -30,3 +30,3 @@ 'use strict';

var canceled = _getActionCreators.canceled;
var failed = _getActionCreators.failed;
var validationFailed = _getActionCreators.validationFailed;
var focused = _getActionCreators.focused;

@@ -43,3 +43,3 @@ var blurred = _getActionCreators.blurred;

change: [changed, saved, canceled],
fail: failed,
fail: validationFailed,
focus: focused,

@@ -64,2 +64,4 @@ blur: blurred

var form = null;
// getProps takes some state and merges it with the store's state

@@ -69,22 +71,26 @@ // this is so you can pass in state during render time and have it be picked

var getProps = function getProps(state) {
return (0, _fluxForm2['default'])(namespace, {
dispatch: function dispatch(res) {
var _res$meta = res.meta;
var namespace = _res$meta.namespace;
var name = _res$meta.name;
var details = {
id: res.type,
namespace: namespace,
name: name
};
alt.dispatch(res.type, res.payload, details);
}
}, _extends({}, opts, {
form = (0, _fluxForm2['default'])(namespace, alt, _extends({}, opts, {
state: _extends({}, state, store.getState().state)
}));
return form;
};
return { store: store, state: state, getProps: getProps };
var validate = function validate(cb, v) {
return form ? form.validate(cb, v) : Promise.reject();
};
var save = function save(cb) {
return form ? form.save(cb) : Promise.reject();
};
var normalize = function normalize() {
return form ? form.normalize() : null;
};
return {
store: store,
state: state,
getProps: getProps,
validate: validate,
save: save
};
};
{
"name": "alt-form",
"version": "3.0.0",
"version": "4.0.0",
"description": "Manage your forms with alt",
"main": "lib/altForm.js",
"dependencies": {
"flux-form": "3.0.0"
"flux-form": "4.1.0"
},

@@ -9,0 +9,0 @@ "devDependencies": {

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