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

@folklore/forms

Package Overview
Dependencies
Maintainers
0
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@folklore/forms - npm Package Compare versions

Comparing version 0.0.23 to 0.0.24

10

dist/cjs.js

@@ -56,4 +56,6 @@ 'use strict';

getFieldValue = null,
onComplete = null
} = opts;
onComplete = null,
csrfTokenName = null,
xsrfTokenName = null
} = opts || {};
const [stateValue, setStateValue] = react.useState(initialValue || providedValue);

@@ -123,4 +125,4 @@ const [stateErrors, setStateErrors] = react.useState(initialErrors || providedErrors);

credentials: 'include',
headers: fetch.getCSRFHeaders()
}), [postForm, fetch.postJSON, fetch.getCSRFHeaders]);
headers: fetch.getCSRFHeaders(csrfTokenName, xsrfTokenName)
}), [postForm, fetch.postJSON, fetch.getCSRFHeaders, csrfTokenName, xsrfTokenName]);
const submit = react.useCallback(function () {

@@ -127,0 +129,0 @@ let submitValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : value;

@@ -47,4 +47,6 @@ import { getCsrfToken, postJSON, getCSRFHeaders } from '@folklore/fetch';

getFieldValue = null,
onComplete = null
} = opts;
onComplete = null,
csrfTokenName = null,
xsrfTokenName = null
} = opts || {};
const [stateValue, setStateValue] = useState(initialValue || providedValue);

@@ -114,4 +116,4 @@ const [stateErrors, setStateErrors] = useState(initialErrors || providedErrors);

credentials: 'include',
headers: getCSRFHeaders()
}), [postForm, postJSON, getCSRFHeaders]);
headers: getCSRFHeaders(csrfTokenName, xsrfTokenName)
}), [postForm, postJSON, getCSRFHeaders, csrfTokenName, xsrfTokenName]);
const submit = useCallback(function () {

@@ -118,0 +120,0 @@ let submitValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : value;

6

package.json
{
"name": "@folklore/forms",
"version": "0.0.23",
"version": "0.0.24",
"description": "Forms utilities",

@@ -43,3 +43,3 @@ "keywords": [

"@babel/runtime": "^7.4.3",
"@folklore/fetch": "^0.1.17",
"@folklore/fetch": "^0.1.18",
"lodash": "^4.17.4"

@@ -55,3 +55,3 @@ },

},
"gitHead": "ebe66bb082229ac829cbbdc5054cf0e7bbce9460"
"gitHead": "299c4d804aaa15455627b5ae353d3936da9fd692"
}
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