ampersand-sync
Advanced tools
Comparing version 5.0.1 to 5.1.0
@@ -76,3 +76,7 @@ /*$AMPERSAND_VERSION*/ | ||
options.url += includes(options.url, '?') ? '&' : '?'; | ||
options.url += qs.stringify(options.data); | ||
// set stringify encoding options and create a different URI output if qsOption is defined | ||
// ex) qsOptions = { indices: false } | ||
// https://www.npmjs.com/package/qs/v/4.0.0#stringifying | ||
options.url += qs.stringify(options.data, options.qsOptions); | ||
//delete `data` so `xhr` doesn't use it as a body | ||
@@ -79,0 +83,0 @@ delete options.data; |
{ | ||
"name": "ampersand-sync", | ||
"description": "Provides sync behavior for updating data from ampersand models and collections to the server.", | ||
"version": "5.0.1", | ||
"version": "5.1.0", | ||
"author": "Henrik Joreteg <henrik@andyet.net>", | ||
@@ -6,0 +6,0 @@ "files": [ |
@@ -69,2 +69,3 @@ # ampersand-sync | ||
- data - JSON serializable object to be sent as request body | ||
- qsOptions - set stringify encoding options and create a different URI output if needed [[see qs.stringify(string,[options])]](https://www.npmjs.com/package/qs/v/4.0.0#stringifying) | ||
- `success(body, 'success', responseObject)` - optional callback to be called when request finishes successfully | ||
@@ -71,0 +72,0 @@ - `error(responseObject, 'error', error.message)` - optional callback to be called when an error occurs (http request/response error or parsing response error) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14566
137
124
1