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

react-stickerpipe

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-stickerpipe - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

8

dist/components/sticker-pack-preview.js

@@ -66,2 +66,10 @@ 'use strict';

storage.storePack(pack.pack_name, pack.title, pack.stickers);
var storedPacks = storage.getMyPacks();
if (storedPacks.length > 0) {
storedPacks.unshift(pack);
storage.storeMyPacks(storedPacks);
}
onPurchase();

@@ -68,0 +76,0 @@

@@ -96,2 +96,16 @@ 'use strict';

var storedPacks = this.storage.getMyPacks();
if (storedPacks && storedPacks.length > 0) {
if (callback) {
callback(storedPacks[0].pack_name);
}
this.setState({
stickerPacks: storedPacks
});
return false;
}
this.client.getMyPacks(function (err, res) {

@@ -110,2 +124,4 @@ if (err) {

_this2.storage.storeMyPacks(stickerPacks);
_this2.setState({

@@ -117,2 +133,4 @@ stickerPacks: stickerPacks

});
return false;
}

@@ -119,0 +137,0 @@ }, {

@@ -58,2 +58,36 @@ 'use strict';

}
}, {
key: 'storeMyPacks',
value: function storeMyPacks(packs) {
try {
var key = this.userId + '-sticker-packs';
var data = packs.map(function (pack) {
return {
pack_name: pack.pack_name,
main_icon: pack.main_icon
};
});
var value = JSON.stringify(data);
localStorage.setItem(key, value);
} catch (err) {
console.warn('Error while saving to localStorage.', err);
}
}
}, {
key: 'getMyPacks',
value: function getMyPacks() {
try {
var key = this.userId + '-sticker-packs';
var storedPacks = JSON.parse(localStorage.getItem(key));
return storedPacks;
} catch (err) {
console.warn('Error while retrieving item from localStorage.', err);
}
return null;
}
}]);

@@ -60,0 +94,0 @@

2

package.json
{
"name": "react-stickerpipe",
"version": "1.5.0",
"version": "1.5.1",
"description": "React Component for StickerPipe API",

@@ -5,0 +5,0 @@ "main": "dist/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