Socket
Socket
Sign inDemoInstall

simple-localstorage-data-service-stub

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-localstorage-data-service-stub - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

16

data-service.js

@@ -14,3 +14,8 @@ const getData = (url = '') => {

const dataService = ({initialDataFile = 'data/initialData.json', savedDataFile = null, flushStorage = false}) => {
const dataService = (
{
initialDataFile = 'data/initialData.json',
savedDataFile = null,
flushStorage = false
} = {}) => {
let data, resourceNames, actionNames, permissions;

@@ -20,6 +25,6 @@

return new Promise((resolve, reject) => {
try{
try {
data = JSON.parse(r);
resourceNames = data ? Object.keys(data) : [];
actionNames = data ? Object.keys(actions): [];
actionNames = data ? Object.keys(actions) : [];
resolve(data)

@@ -60,3 +65,4 @@ } catch (error) {

initData().then(() => {});
initData().then(() => {
});

@@ -137,3 +143,3 @@ const hasPermission = (resource, action) => permissions[resource]?.includes(action) || false;

if (data) {
const blob = new Blob([JSON.stringify(data)], { type: "text/json" });
const blob = new Blob([JSON.stringify(data)], {type: "text/json"});
const link = document.createElement("a");

@@ -140,0 +146,0 @@

{
"name": "simple-localstorage-data-service-stub",
"version": "1.0.6",
"version": "1.0.7",
"description": "REST-API-esque stub service for frontend experiments",

@@ -5,0 +5,0 @@ "main": "data-service.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