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

synapsepay

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

synapsepay - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

11

lib/Helpers.js
var request = require('superagent');
var mime = require('mime');
var CryptoJS = require('crypto-js');
var _ = require('underscore')._;
const os = require('os');

@@ -42,2 +44,11 @@ var Helpers = {

return (hashed === given_hmac);
},
getUserIP: function() {
return _.chain(os.networkInterfaces())
.values()
.flatten()
.find({family: 'IPv4', internal: false})
.value()
.address;
}

@@ -44,0 +55,0 @@ };

11

lib/User.js

@@ -50,2 +50,11 @@ var APIClient = require('./APIClient.js');

User.prototype.addDocuments = function(payload, callback){
var url = this.json['_links']['self']['href'];
var self = this;
var config = this.getAPIConfig();
APIClient.patch(url, config, payload, function(err, json){
self.updateJSON(err, json, callback);
});
};
User.prototype.addDoc = function(payload, callback){

@@ -78,2 +87,2 @@ var url = this.json['_links']['self']['href'];

module.exports = User;
module.exports = User;

@@ -10,3 +10,8 @@ var APIClient = require('./APIClient.js');

};
var url = client.baseUrl + '/users';
var url = `${client.baseUrl}/users`;
if(options.query) {
url += `?query=${options.query}`;
}
if(options){

@@ -13,0 +18,0 @@ if(options._id){

5

package.json
{
"name": "synapsepay",
"version": "0.0.3",
"version": "0.1.0",
"description": "Node.js Library for SynapsePay API v3 Rest",

@@ -25,4 +25,5 @@ "main": "index.js",

"mime": "^1.3.0",
"superagent": "^1.5.0"
"superagent": "^1.5.0",
"underscore": "^1.8.3"
}
}
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