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

fca-unofficial

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fca-unofficial - npm Package Compare versions

Comparing version 1.2.7 to 1.2.8

2

package.json
{
"name": "fca-unofficial",
"version": "1.2.7",
"version": "1.2.8",
"description": "A Facebook chat API that doesn't rely on XMPP. Will NOT be deprecated after April 30th 2015.",

@@ -5,0 +5,0 @@ "scripts": {

@@ -7,3 +7,3 @@ "use strict";

module.exports = function(defaultFuncs, api, ctx) {
return function httpGet(url, form, callback) {
return function httpGet(url, form, callback, notAPI) {
var resolveFunc = function(){};

@@ -29,11 +29,23 @@ var rejectFunc = function(){};

defaultFuncs
.get(url, ctx.jar, form, {})
.then(function(resData) {
callback(null, resData.body.toString());
})
.catch(function(err) {
log.error("httpGet", err);
return callback(err);
});
if (notAPI) {
utils
.get(url, ctx.jar, form, ctx.globalOptions)
.then(function(resData) {
callback(null, resData.body.toString());
})
.catch(function(err) {
log.error("httpGet", err);
return callback(err);
});
} else {
defaultFuncs
.get(url, ctx.jar, form)
.then(function(resData) {
callback(null, resData.body.toString());
})
.catch(function(err) {
log.error("httpGet", err);
return callback(err);
});
}

@@ -40,0 +52,0 @@ return returnPromise;

@@ -7,3 +7,3 @@ "use strict";

module.exports = function(defaultFuncs, api, ctx) {
return function httpGet(url, form, callback) {
return function httpGet(url, form, callback, notAPI) {
var resolveFunc = function(){};

@@ -29,11 +29,23 @@ var rejectFunc = function(){};

defaultFuncs
.post(url, ctx.jar, form, {})
.then(function(resData) {
callback(null, resData.body.toString());
})
.catch(function(err) {
log.error("httpPost", err);
return callback(err);
});
if (notAPI) {
utils
.post(url, ctx.jar, form, ctx.globalOptions)
.then(function(resData) {
callback(null, resData.body.toString());
})
.catch(function(err) {
log.error("httpPost", err);
return callback(err);
});
} else {
defaultFuncs
.post(url, ctx.jar, form, {})
.then(function(resData) {
callback(null, resData.body.toString());
})
.catch(function(err) {
log.error("httpPost", err);
return callback(err);
});
}

@@ -40,0 +52,0 @@ return returnPromise;

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