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

@filerobot/store-default

Package Overview
Dependencies
Maintainers
5
Versions
729
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@filerobot/store-default - npm Package Compare versions

Comparing version 1.8.0 to 2.0.0-beta.0

20

lib/index.js

@@ -0,9 +1,8 @@

function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
// TODO: find a way to show version of the current plugin

@@ -19,3 +18,2 @@ // why solution below isn't good?

// import packageInfo from '../package.json'
/**

@@ -26,9 +24,8 @@ * Default store that keeps state in a simple object.

// static VERSION = packageInfo.version
function DefaultStore() {
_classCallCheck(this, DefaultStore);
this.state = {};
this.callbacks = [];
}
_createClass(DefaultStore, [{

@@ -43,7 +40,4 @@ key: "getState",

var prevState = _extends({}, this.state);
var nextState = _extends({}, this.state, patch);
this.state = nextState;
this._publish(prevState, nextState, patch);

@@ -55,3 +49,2 @@ }

var _this = this;
this.callbacks.push(listener);

@@ -69,3 +62,2 @@ return function () {

}
this.callbacks.forEach(function (listener) {

@@ -76,8 +68,6 @@ listener.apply(void 0, args);

}]);
return DefaultStore;
}();
export default function defaultStore() {
return new DefaultStore();
}
{
"name": "@filerobot/store-default",
"description": "The default simple object-based store for Filerobot Media Asset Widget.",
"version": "1.8.0",
"version": "2.0.0-beta.0",
"license": "MIT",

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