Socket
Socket
Sign inDemoInstall

ampersand-sync

Package Overview
Dependencies
Maintainers
5
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 4.0.1 to 4.0.2

5

core.js

@@ -7,2 +7,3 @@ /*$AMPERSAND_VERSION*/

var qs = require('qs');
var mediaType = require('media-type');

@@ -131,3 +132,5 @@

// Parse body as JSON
if (typeof body === 'string' && (!params.headers.accept || params.headers.accept.indexOf('application/json')===0)) {
var accept = mediaType.fromString(params.headers.accept);
var parseJson = accept.isValid() && accept.type === 'application' && (accept.subtype === 'json' || accept.suffix === 'json');
if (typeof body === 'string' && (!params.headers.accept || parseJson)) {
try {

@@ -134,0 +137,0 @@ body = JSON.parse(body);

3

package.json
{
"name": "ampersand-sync",
"description": "Provides sync behavior for updating data from ampersand models and collections to the server.",
"version": "4.0.1",
"version": "4.0.2",
"author": "Henrik Joreteg <henrik@andyet.net>",

@@ -24,2 +24,3 @@ "files": [

"lodash.result": "^3.0.0",
"media-type": "0.3.0",
"qs": "^4.0.0",

@@ -26,0 +27,0 @@ "request": "^2.55.0",

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