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

storyblok-js-client

Package Overview
Dependencies
Maintainers
1
Versions
201
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storyblok-js-client - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

8

index.js

@@ -15,7 +15,7 @@ 'use strict';

let headers = Object.assign({'X-Storyblok-Client': 'JS/1.0.0'}, config.headers);
let headers = Object.assign({}, {'X-Storyblok-Client': 'JS/1.0.0'}, config.headers);
this.cacheVersion = (this.cacheVersion || this.newVersion());
this.accessToken = config.accessToken;
this.cache = config.cache || {};
this.cache = config.cache || {clear: 'manual'};
this.client = axios.create({

@@ -54,2 +54,6 @@ baseURL: endpoint,

if (this.cache.clear === 'auto' && params.version === 'draft') {
this.flushCache();
}
if (params.version === 'published' && cache) {

@@ -56,0 +60,0 @@ resolve(cache);

{
"name": "storyblok-js-client",
"version": "1.0.1",
"version": "1.0.2",
"description": "Universal JavaScript SDK for Storyblok's API",

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

@@ -40,8 +40,9 @@ # Universal JavaScript SDK for Storyblok's API

When initializing the Storyblok client you can define a cache provider for caching the requests in memory.
To clear the cache you can call `Storyblok.flushCache();`.
To clear the cache you can call `Storyblok.flushCache();` or activate the automatic clear with clear: 'auto'.
```javascript
let Storyblok = new StoryblokClient({
privateToken: 'xf5dRMMjltLzKOcNgMaU9Att',
accessToken: 'xf5dRMMjltLzKOcNgMaU9Att',
cache: {
clear: 'auto',
type: 'memory'

@@ -48,0 +49,0 @@ }

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