Socket
Socket
Sign inDemoInstall

ampersand-sync

Package Overview
Dependencies
Maintainers
6
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ampersand-sync - npm Package Compare versions

Comparing version 5.0.1 to 5.1.0

6

core.js

@@ -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;

2

package.json
{
"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)

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