New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

uber-handler

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uber-handler - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

26

index.js

@@ -8,2 +8,4 @@ const Axios = require("axios");

this.uberMotorProductId = "89da0988-cb4f-4c85-b84f-aac2f5115068";
this.axios = Axios.create({

@@ -19,5 +21,8 @@ baseURL: "https://api.uber.com/v1.2",

this.getMotorBikePrice = this.getMotorBikePrice.bind(this);
this.getDriverEstimatedTimeOfArrival = this.getDriverEstimatedTimeOfArrival.bind(
this
);
}
getMotorBikePrice(start, end) {
getMotorBikePrice(start = {}, end = {}) {
const payload = {

@@ -33,5 +38,4 @@ start_latitude: start.lat,

.then(response => {
const uberMotorProductId = "89da0988-cb4f-4c85-b84f-aac2f5115068"; //uberMotor
const uberMotor = response.data.prices.filter(
item => item.product_id == uberMotorProductId
item => item.product_id == this.uberMotorProductId
)[0];

@@ -48,2 +52,18 @@

}
getDriverEstimatedTimeOfArrival(start = {}) {
const payload = {
start_latitude: start.lat,
start_longitude: start.long,
product_id: this.uberMotorProductId
};
return this.axios
.get(`/estimates/time?${queryString.stringify(payload)}`)
.then(response => {
return {
estimate: response.data.times[0].estimate
};
});
}
};

4

package.json
{
"name": "uber-handler",
"version": "0.1.3",
"version": "0.2.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"release": "np"

@@ -17,4 +16,5 @@ },

"devDependencies": {
"dotenv": "^4.0.0",
"np": "^2.16.0"
}
}

Sorry, the diff of this file is not supported yet

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