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 1.0.4 to 1.1.0

26

lib/altForm.js

@@ -15,2 +15,8 @@ 'use strict';

var isRequired = function isRequired(data) {
if (!data) throw new Error('Field is required');
};
exports.isRequired = isRequired;
exports['default'] = function (namespace, alt, opts) {

@@ -24,10 +30,18 @@ var state = opts.state || {};

var canceled = _getActionCreators.canceled;
var failed = _getActionCreators.failed;
var store = alt.createUnsavedStore({
state: state,
state: {
errors: null,
state: state
},
bindListeners: {
change: [changed.id, saved.id, canceled.id]
change: [changed, saved, canceled],
fail: failed
},
fail: function fail(invalidState) {
this.setState({ errors: invalidState });
},
change: function change(state) {
this.setState(state);
this.setState({ errors: null, state: state });
}

@@ -41,3 +55,3 @@ });

return (0, _fluxForm2['default'])(namespace, alt.dispatcher, _extends({}, opts, {
state: _extends({}, state, store.getState())
state: _extends({}, state, store.getState().state)
}));

@@ -47,4 +61,2 @@ };

return { store: store, state: state, getProps: getProps };
};
module.exports = exports['default'];
};
{
"name": "alt-form",
"version": "1.0.4",
"version": "1.1.0",
"description": "Manage your forms with alt",
"main": "lib/altForm.js",
"dependencies": {
"flux-form": "1.0.2"
"flux-form": "1.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