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

@statickit/core

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@statickit/core - npm Package Compare versions

Comparing version 1.3.1 to 1.4.0

4

CHANGELOG.md
# Changelog
## 1.4.0
- Accept `site` + `form` combo (in lieu of `id`) for identifying forms.
## 1.3.0

@@ -4,0 +8,0 @@

20

dist/statickit.cjs.js

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

};
var submissionUrl = function submissionUrl(props) {
var id = props.id,
site = props.site,
form = props.form;
var endpoint = props.endpoint || 'https://api.statickit.com';
if (site && form) {
return "".concat(endpoint, "/j/sites/").concat(site, "/forms/").concat(form, "/submissions");
} else {
return "".concat(endpoint, "/j/forms/").concat(id, "/submissions");
}
};
/**

@@ -965,4 +978,4 @@ * The client constructor.

StaticKit.prototype.submitForm = function submitForm(props) {
if (!props.id) {
throw new Error('You must provide an `id` for the form');
if (!props.id && !(props.site && props.form)) {
throw new Error('You must set an `id` or `site` & `form` properties');
}

@@ -973,4 +986,3 @@

}).fetch;
var endpoint = props.endpoint || 'https://api.statickit.com';
var url = "".concat(endpoint, "/j/forms/").concat(props.id, "/submissions");
var url = submissionUrl(props);
var data = props.data || {};

@@ -977,0 +989,0 @@ var session = objectAssign({}, this.session, {

@@ -916,2 +916,15 @@ var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';

};
var submissionUrl = function submissionUrl(props) {
var id = props.id,
site = props.site,
form = props.form;
var endpoint = props.endpoint || 'https://api.statickit.com';
if (site && form) {
return "".concat(endpoint, "/j/sites/").concat(site, "/forms/").concat(form, "/submissions");
} else {
return "".concat(endpoint, "/j/forms/").concat(id, "/submissions");
}
};
/**

@@ -963,4 +976,4 @@ * The client constructor.

StaticKit.prototype.submitForm = function submitForm(props) {
if (!props.id) {
throw new Error('You must provide an `id` for the form');
if (!props.id && !(props.site && props.form)) {
throw new Error('You must set an `id` or `site` & `form` properties');
}

@@ -971,4 +984,3 @@

}).fetch;
var endpoint = props.endpoint || 'https://api.statickit.com';
var url = "".concat(endpoint, "/j/forms/").concat(props.id, "/submissions");
var url = submissionUrl(props);
var data = props.data || {};

@@ -975,0 +987,0 @@ var session = objectAssign({}, this.session, {

{
"name": "@statickit/core",
"version": "1.3.1",
"version": "1.4.0",
"description": "The core library for StaticKit",

@@ -5,0 +5,0 @@ "homepage": "https://statickit.com",

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