1 | export var createLoadableStream = function () { return ({ marks: {} }); };
|
2 | export var clearStream = function (stream) {
|
3 | if (stream) {
|
4 | stream.marks = {};
|
5 | }
|
6 | };
|
7 | export var checkStream = function (stream) {
|
8 | if (process.env.NODE_ENV !== 'production') {
|
9 | if (!stream) {
|
10 | return;
|
11 | }
|
12 | if (typeof stream !== 'object' || !stream.marks) {
|
13 | throw new Error('react-imported-component: version 6 requires `stream` to be an object. Refer to the migration guide');
|
14 | }
|
15 | }
|
16 | };
|
17 | export var defaultStream = createLoadableStream();
|