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

push-huawei

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

push-huawei - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

10

lib/push-huawei.js

@@ -6,3 +6,2 @@ const axios = require('axios');

const cache = {};
class Huawei {

@@ -21,2 +20,3 @@ constructor(options = {}) {

this.options = options;
this.cache = {};
}

@@ -141,4 +141,4 @@

async getToken() {
if (cache.access_token && cache.time - new Date().getTime() > 0) {
return { access_token: cache.access_token }
if (this.cache.access_token && this.cache.time - new Date().getTime() > 0) {
return { access_token: this.cache.access_token }
}

@@ -157,4 +157,4 @@ const res = await axios({

if(res.data.access_token){
cache.access_token = res.data.access_token;
cache.time = new Date().getTime() + (res.data.expires_in * 1000);
this.cache.access_token = res.data.access_token;
this.cache.time = new Date().getTime() + (res.data.expires_in * 1000);
}

@@ -161,0 +161,0 @@

{
"name": "push-huawei",
"version": "0.2.3",
"version": "0.2.4",
"description": "push-huawei",

@@ -5,0 +5,0 @@ "main": "index.js",

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