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

baselinejs

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

baselinejs - npm Package Compare versions

Comparing version 0.2.2 to 1.0.0

24

collectionService.js

@@ -253,7 +253,7 @@ var _ = require( 'underscore' );

resolve( returnedJson );
resolve( true, returnedJson );
},
error : function() {
error : function( xhr ) {
if( options.error ) options.error.apply( this, arguments );
reject.apply( this, arguments );
resolve( false, xhr );
}

@@ -286,7 +286,7 @@ } );

resolve( returnedJson );
resolve( true, returnedJson );
},
error : function() {
error : function( xhr ) {
if( options.error ) options.error.apply( this, arguments );
reject.apply( this, arguments );
resolve( false, xhr );
}

@@ -343,6 +343,6 @@ } );

if( ! base ) throw new Error( 'A "url" property or function must be specified' );
if( method == 'create' || _.isArray( recordIdOrIds ) ) return base;
var endpoint = base;
var recordId = recordIdOrIds;
var endpoint = base.replace( /([^\/])$/, '$1/' ) + encodeURIComponent( recordId );
endpoint = endpoint.replace( /\/:(\w+)/g, function( match, fieldName ) {

@@ -352,2 +352,6 @@ return '/' + _this.get( recordId, fieldName );

if( method != 'create' && ! _.isArray( recordIdOrIds ) ) {
endpoint = base.replace( /([^\/])$/, '$1/' ) + encodeURIComponent( recordId );
}
return endpoint;

@@ -388,3 +392,3 @@ },

_sync : function( url, method, payload, options ) {
_sync : function( url, method, payload, ajaxOptions ) {
var options = _.defaults( {}, options );

@@ -410,3 +414,3 @@

// Make the request, allowing the user to override any Ajax options.
var xhr = options.xhr = $.ajax( _.extend( params, options ) );
var xhr = $.ajax( _.extend( params, ajaxOptions ) );
return xhr;

@@ -413,0 +417,0 @@ }

{
"name": "baselinejs",
"version": "0.2.2",
"version": "1.0.0",
"description": "Share code and data between the client and the server in full stack JavaScript applications.",

@@ -15,3 +15,3 @@ "main": "baseline.js",

"jquery": "^2.1.4",
"node-uuid": "1.4.1",
"node-uuid": "^1.4.1",
"steamer": "~0.2.0",

@@ -18,0 +18,0 @@ "underscore": "^1.8.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