diff --git a/samples/async.js b/samples/async.js index e897836..1773988 100644 --- a/samples/async.js +++ b/samples/async.js @@ -1,4 +1,4 @@ -const strom = require("strom"); +const strom = require("strom").strom(); strom.fromArray(["a", "b", "c"]) .pipe(strom.map(s => Promise.resolve(s + s))) diff --git a/samples/child.js b/samples/child.js index aa1d8e3..1b079d3 100644 --- a/samples/child.js +++ b/samples/child.js @@ -1,4 +1,4 @@ -const strom = require("strom"); +const strom = require("strom").strom(); const catProcess = require("child_process").exec("grep -o ab"); strom.fromArray(["a", "b", "c"]) diff --git a/samples/collect.js b/samples/collect.js index a1d43cd..be37bd4 100644 --- a/samples/collect.js +++ b/samples/collect.js @@ -1,4 +1,4 @@ -const strom = require("strom"); +const strom = require("strom").strom(); strom.fromArray(["a", "b", "c"]) .pipe(strom.collect({ objectMode: true })) diff --git a/samples/concat.js b/samples/concat.js index 17c5367..0e5bd81 100644 --- a/samples/concat.js +++ b/samples/concat.js @@ -1,5 +1,5 @@ const { Readable } = require("stream"); -const strom = require("strom"); +const strom = require("strom").strom(); const source1 = new Readable(); const source2 = new Readable(); diff --git a/samples/duplex.js b/samples/duplex.js index 6af834b..1e1cb92 100644 --- a/samples/duplex.js +++ b/samples/duplex.js @@ -1,4 +1,4 @@ -const strom = require("strom"); +const strom = require("strom").strom(); const catProcess = require("child_process").exec("grep -o ab"); strom.fromArray(["a", "b", "c"]) diff --git a/samples/filter.js b/samples/filter.js index 78d1981..f8013ce 100644 --- a/samples/filter.js +++ b/samples/filter.js @@ -1,4 +1,4 @@ -const strom = require("strom"); +const strom = require("strom").strom(); strom.fromArray(["a", "b", "c"]) .pipe(strom.filter(s => s !== "b")) diff --git a/samples/flatMap.js b/samples/flatMap.js index f9b8ab9..a961431 100644 --- a/samples/flatMap.js +++ b/samples/flatMap.js @@ -1,4 +1,4 @@ -const strom = require("strom"); +const strom = require("strom").strom(); strom.fromArray(["a", "AA"]) .pipe(strom.flatMap(s => new Array(s.length).fill(s))) diff --git a/samples/join.js b/samples/join.js index 1b57833..d9d4085 100644 --- a/samples/join.js +++ b/samples/join.js @@ -1,4 +1,4 @@ -const strom = require("strom"); +const strom = require("strom").strom(); strom.fromArray(["a", "b", "c"]) .pipe(strom.join(",")) diff --git a/samples/last.js b/samples/last.js index b508dbf..c95742d 100644 --- a/samples/last.js +++ b/samples/last.js @@ -1,4 +1,4 @@ -const strom = require("strom"); +const strom = require("strom").strom(); let f = async () => { const source = strom.fromArray(["a", "b", "c"]); diff --git a/samples/map.js b/samples/map.js index 54848c2..98c6ae5 100644 --- a/samples/map.js +++ b/samples/map.js @@ -1,4 +1,4 @@ -const strom = require("strom"); +const strom = require("strom").strom(); strom.fromArray(["a", "b"]) .pipe(strom.map(s => s.toUpperCase())) diff --git a/samples/merge.js b/samples/merge.js index d2fb028..fa927db 100644 --- a/samples/merge.js +++ b/samples/merge.js @@ -1,5 +1,5 @@ const { Readable } = require("stream"); -const strom = require("strom"); +const strom = require("strom").strom(); const source1 = new Readable({ read() {} }); const source2 = new Readable({ read() {} }); diff --git a/samples/parse.js b/samples/parse.js index 3916cd3..2fd752a 100644 --- a/samples/parse.js +++ b/samples/parse.js @@ -1,4 +1,4 @@ -const strom = require("strom"); +const strom = require("strom").strom(); strom.fromArray(['{ "a": "b" }']) .pipe(strom.parse()) diff --git a/samples/reduce.js b/samples/reduce.js index 7b62038..53b4b60 100644 --- a/samples/reduce.js +++ b/samples/reduce.js @@ -1,4 +1,4 @@ -const strom = require("strom"); +const strom = require("strom").strom(); strom.fromArray(["a", "b", "cc"]) .pipe(strom.reduce((acc, s) => ({ ...acc, [s]: s.length }), {})) diff --git a/samples/replace.js b/samples/replace.js index 1df484c..90ce470 100644 --- a/samples/replace.js +++ b/samples/replace.js @@ -1,4 +1,4 @@ -const strom = require("strom"); +const strom = require("strom").strom(); strom.fromArray(["a1", "b22", "c333"]) .pipe(strom.replace(/b\d+/, "B")) diff --git a/samples/split.js b/samples/split.js index 24c005b..467b5fe 100644 --- a/samples/split.js +++ b/samples/split.js @@ -1,4 +1,4 @@ -const strom = require("strom"); +const strom = require("strom").strom(); strom.fromArray(["a,b", "c,d"]) .pipe(strom.split(",")) diff --git a/samples/stringify.js b/samples/stringify.js index e7c5f35..e9820cc 100644 --- a/samples/stringify.js +++ b/samples/stringify.js @@ -1,4 +1,4 @@ -const strom = require("strom"); +const strom = require("strom").strom(); strom.fromArray([{ a: "b" }]) .pipe(strom.stringify())