Socket
Socket
Sign inDemoInstall

@storybook/addons

Package Overview
Dependencies
0
Maintainers
8
Versions
1495
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.2.0 to 3.2.6-alpha.0

36

dist/index.js

@@ -1,2 +0,2 @@

"use strict";
'use strict';

@@ -8,11 +8,11 @@ Object.defineProperty(exports, "__esModule", {

var _keys = require("babel-runtime/core-js/object/keys");
var _keys = require('babel-runtime/core-js/object/keys');
var _keys2 = _interopRequireDefault(_keys);
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = require("babel-runtime/helpers/createClass");
var _createClass2 = require('babel-runtime/helpers/createClass');

@@ -29,5 +29,2 @@ var _createClass3 = _interopRequireDefault(_createClass2);

this.panels = {};
// this.channel should get overwritten by setChannel if package versions are
// correct and AddonStore is a proper singleton. If not, this will be null
// (currently required by @storybook/react-native getStorybookUI)
this.channel = null;

@@ -39,8 +36,13 @@ this.preview = null;

(0, _createClass3.default)(AddonStore, [{
key: "getChannel",
key: 'getChannel',
value: function getChannel() {
// this.channel should get overwritten by setChannel if package versions are
// correct and AddonStore is a proper singleton. If not, throw.
if (!this.channel) {
throw new Error('Accessing nonexistent addons channel, see https://storybook.js.org/basics/faq/#why-is-there-no-addons-channel');
}
return this.channel;
}
}, {
key: "setChannel",
key: 'setChannel',
value: function setChannel(channel) {

@@ -50,3 +52,3 @@ this.channel = channel;

}, {
key: "getPreview",
key: 'getPreview',
value: function getPreview() {

@@ -56,3 +58,3 @@ return this.preview;

}, {
key: "setPreview",
key: 'setPreview',
value: function setPreview(preview) {

@@ -62,3 +64,3 @@ this.preview = preview;

}, {
key: "getDatabase",
key: 'getDatabase',
value: function getDatabase() {

@@ -68,3 +70,3 @@ return this.database;

}, {
key: "setDatabase",
key: 'setDatabase',
value: function setDatabase(database) {

@@ -74,3 +76,3 @@ this.database = database;

}, {
key: "getPanels",
key: 'getPanels',
value: function getPanels() {

@@ -80,3 +82,3 @@ return this.panels;

}, {
key: "addPanel",
key: 'addPanel',
value: function addPanel(name, panel) {

@@ -86,3 +88,3 @@ this.panels[name] = panel;

}, {
key: "register",
key: 'register',
value: function register(name, loader) {

@@ -92,3 +94,3 @@ this.loaders[name] = loader;

}, {
key: "loadAddons",
key: 'loadAddons',
value: function loadAddons(api) {

@@ -95,0 +97,0 @@ var _this = this;

{
"name": "@storybook/addons",
"version": "3.2.0",
"version": "3.2.6-alpha.0",
"description": "Storybook addons store",

@@ -5,0 +5,0 @@ "keywords": [

@@ -5,5 +5,2 @@ export class AddonStore {

this.panels = {};
// this.channel should get overwritten by setChannel if package versions are
// correct and AddonStore is a proper singleton. If not, this will be null
// (currently required by @storybook/react-native getStorybookUI)
this.channel = null;

@@ -15,2 +12,9 @@ this.preview = null;

getChannel() {
// this.channel should get overwritten by setChannel if package versions are
// correct and AddonStore is a proper singleton. If not, throw.
if (!this.channel) {
throw new Error(
'Accessing nonexistent addons channel, see https://storybook.js.org/basics/faq/#why-is-there-no-addons-channel'
);
}
return this.channel;

@@ -17,0 +21,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc