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

cc-api-next

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cc-api-next - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

10

index.js
const fetch = require('isomorphic-unfetch');
import Cookies from 'universal-cookie';
const cookies = new Cookies();
class Api {

@@ -14,11 +17,12 @@

this.headers['x-token'] = props.token || this.token || '';
}
setToken(token){
this.headers['x-token'] = token;
this.headers['x-token'] = token || cookies.get(this.tokenKey);
}
async call(path, data, config) {
if(!this.headers['x-token']){
this.setToken();
}
if(config === undefined){

@@ -25,0 +29,0 @@ config = data || {};

{
"name": "cc-api-next",
"version": "1.0.3",
"version": "1.0.4",
"description": "cc api next",

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

"dependencies": {
"isomorphic-unfetch": "^3.0.0"
"isomorphic-unfetch": "^3.0.0",
"universal-cookie": "^4.0.2"
}
}
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