@cuecue/core 0.0.27 → 0.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +29 -13
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,10 +1,22 @@
1
- import StateMachine from 'javascript-state-machine';
2
- import EventEmitter from 'wolfy87-eventemitter';
3
- import createDebug from 'debug';
4
- import isArray from 'lodash/isArray';
5
- import isObject from 'lodash/isObject';
1
+ 'use strict';
6
2
 
7
- class BasePlugin extends EventEmitter {
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var StateMachine = require('javascript-state-machine');
6
+ var EventEmitter = require('wolfy87-eventemitter');
7
+ var createDebug = require('debug');
8
+ var isArray = require('lodash/isArray');
9
+ var isObject = require('lodash/isObject');
10
+
11
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
+
13
+ var StateMachine__default = /*#__PURE__*/_interopDefaultLegacy(StateMachine);
14
+ var EventEmitter__default = /*#__PURE__*/_interopDefaultLegacy(EventEmitter);
15
+ var createDebug__default = /*#__PURE__*/_interopDefaultLegacy(createDebug);
16
+ var isArray__default = /*#__PURE__*/_interopDefaultLegacy(isArray);
17
+ var isObject__default = /*#__PURE__*/_interopDefaultLegacy(isObject);
18
+
19
+ class BasePlugin extends EventEmitter__default["default"] {
8
20
  constructor(opts = {}) {
9
21
  super();
10
22
  this.options = { ...opts
@@ -19,8 +31,8 @@ class BasePlugin extends EventEmitter {
19
31
  this.onStopped = this.onStopped.bind(this);
20
32
  this.onPendingTransition = this.onPendingTransition.bind(this);
21
33
  this.onInvalidTransition = this.onInvalidTransition.bind(this);
22
- this.debug = createDebug('cuecue:input');
23
- this.state = new StateMachine({
34
+ this.debug = createDebug__default["default"]('cuecue:input');
35
+ this.state = new StateMachine__default["default"]({
24
36
  transitions: [{
25
37
  name: 'init',
26
38
  from: 'none',
@@ -141,7 +153,7 @@ class BaseInput extends BasePlugin {}
141
153
  class BaseOutput extends BasePlugin {}
142
154
 
143
155
  const parseInputId = data => {
144
- if (isArray(data)) {
156
+ if (isArray__default["default"](data)) {
145
157
  return data.map(({
146
158
  id = null,
147
159
  ...item
@@ -152,7 +164,7 @@ const parseInputId = data => {
152
164
  }));
153
165
  }
154
166
 
155
- if (isObject(data)) {
167
+ if (isObject__default["default"](data)) {
156
168
  const {
157
169
  id = null,
158
170
  ...props
@@ -167,7 +179,7 @@ const parseInputId = data => {
167
179
  return null;
168
180
  };
169
181
  const parseOutputId = data => {
170
- if (isArray(data)) {
182
+ if (isArray__default["default"](data)) {
171
183
  return data.map(({
172
184
  externalId = null,
173
185
  ...item
@@ -178,7 +190,7 @@ const parseOutputId = data => {
178
190
  }));
179
191
  }
180
192
 
181
- if (isObject(data)) {
193
+ if (isObject__default["default"](data)) {
182
194
  const {
183
195
  externalId = null,
184
196
  ...props
@@ -193,4 +205,8 @@ const parseOutputId = data => {
193
205
  return null;
194
206
  };
195
207
 
196
- export { BaseInput, BaseOutput, BasePlugin, parseInputId as parseStoreInputId, parseOutputId as parseStoreOutputId };
208
+ exports.BaseInput = BaseInput;
209
+ exports.BaseOutput = BaseOutput;
210
+ exports.BasePlugin = BasePlugin;
211
+ exports.parseStoreInputId = parseInputId;
212
+ exports.parseStoreOutputId = parseOutputId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuecue/core",
3
- "version": "0.0.27",
3
+ "version": "0.0.31",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -49,5 +49,5 @@
49
49
  "publishConfig": {
50
50
  "access": "public"
51
51
  },
52
- "gitHead": "2c305c0d1c0b13469fe74e2b928c0b45744c8ac0"
52
+ "gitHead": "bc6f4b36d80e298f4f70cb3f581f5bf3f856dadd"
53
53
  }