diff --git a/package.json b/package.json index 061d33f..b5a4c0a 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "@types/sinon": "^7.0.13", "ava": "^2.4.0", "chai": "^4.2.0", - "mhysa": "./", + "stromjs": "./", "prettier": "^1.14.3", "sinon": "^7.4.2", "ts-node": "^8.3.0", diff --git a/samples/async.js b/samples/async.js index 1773988..5f92402 100644 --- a/samples/async.js +++ b/samples/async.js @@ -1,6 +1,7 @@ -const strom = require("strom").strom(); +const strom = require("stromjs"); -strom.fromArray(["a", "b", "c"]) +strom + .fromArray(["a", "b", "c"]) .pipe(strom.map(s => Promise.resolve(s + s))) .pipe(strom.flatMap(s => Promise.resolve([s, s.toUpperCase()]))) .pipe(strom.filter(s => Promise.resolve(s !== "bb"))) diff --git a/samples/child.js b/samples/child.js index 1b079d3..963987c 100644 --- a/samples/child.js +++ b/samples/child.js @@ -1,6 +1,7 @@ -const strom = require("strom").strom(); +const strom = require("stromjs"); const catProcess = require("child_process").exec("grep -o ab"); -strom.fromArray(["a", "b", "c"]) +strom + .fromArray(["a", "b", "c"]) .pipe(strom.child(catProcess)) .pipe(process.stdout); diff --git a/samples/collect.js b/samples/collect.js index be37bd4..0a7b2a2 100644 --- a/samples/collect.js +++ b/samples/collect.js @@ -1,5 +1,6 @@ -const strom = require("strom").strom(); +const strom = require("stromjs"); -strom.fromArray(["a", "b", "c"]) +strom + .fromArray(["a", "b", "c"]) .pipe(strom.collect({ objectMode: true })) .on("data", object => console.log(object)); diff --git a/samples/concat.js b/samples/concat.js index 0e5bd81..00d52a0 100644 --- a/samples/concat.js +++ b/samples/concat.js @@ -1,5 +1,5 @@ const { Readable } = require("stream"); -const strom = require("strom").strom(); +const strom = require("stromjs"); const source1 = new Readable(); const source2 = new Readable(); diff --git a/samples/duplex.js b/samples/duplex.js index 1e1cb92..613c1ec 100644 --- a/samples/duplex.js +++ b/samples/duplex.js @@ -1,6 +1,7 @@ -const strom = require("strom").strom(); +const strom = require("stromjs"); const catProcess = require("child_process").exec("grep -o ab"); -strom.fromArray(["a", "b", "c"]) +strom + .fromArray(["a", "b", "c"]) .pipe(strom.duplex(catProcess.stdin, catProcess.stdout)) .pipe(process.stdout); diff --git a/samples/filter.js b/samples/filter.js index f8013ce..4ea9fc3 100644 --- a/samples/filter.js +++ b/samples/filter.js @@ -1,6 +1,7 @@ -const strom = require("strom").strom(); +const strom = require("stromjs"); -strom.fromArray(["a", "b", "c"]) +strom + .fromArray(["a", "b", "c"]) .pipe(strom.filter(s => s !== "b")) .pipe(strom.join(",")) .pipe(process.stdout); diff --git a/samples/flatMap.js b/samples/flatMap.js index a961431..af76bf5 100644 --- a/samples/flatMap.js +++ b/samples/flatMap.js @@ -1,6 +1,7 @@ -const strom = require("strom").strom(); +const strom = require("stromjs"); -strom.fromArray(["a", "AA"]) +strom + .fromArray(["a", "AA"]) .pipe(strom.flatMap(s => new Array(s.length).fill(s))) .pipe(strom.join(",")) .pipe(process.stdout); diff --git a/samples/join.js b/samples/join.js index d9d4085..73fc51d 100644 --- a/samples/join.js +++ b/samples/join.js @@ -1,5 +1,6 @@ -const strom = require("strom").strom(); +const strom = require("stromjs"); -strom.fromArray(["a", "b", "c"]) +strom + .fromArray(["a", "b", "c"]) .pipe(strom.join(",")) .pipe(process.stdout); diff --git a/samples/last.js b/samples/last.js index c95742d..3b09165 100644 --- a/samples/last.js +++ b/samples/last.js @@ -1,4 +1,4 @@ -const strom = require("strom").strom(); +const strom = require("stromjs"); let f = async () => { const source = strom.fromArray(["a", "b", "c"]); diff --git a/samples/map.js b/samples/map.js index 98c6ae5..68cc8b7 100644 --- a/samples/map.js +++ b/samples/map.js @@ -1,6 +1,7 @@ -const strom = require("strom").strom(); +const strom = require("stromjs"); -strom.fromArray(["a", "b"]) +strom + .fromArray(["a", "b"]) .pipe(strom.map(s => s.toUpperCase())) .pipe(strom.join(",")) .pipe(process.stdout); diff --git a/samples/merge.js b/samples/merge.js index fa927db..2a2db03 100644 --- a/samples/merge.js +++ b/samples/merge.js @@ -1,5 +1,5 @@ const { Readable } = require("stream"); -const strom = require("strom").strom(); +const strom = require("stromjs"); const source1 = new Readable({ read() {} }); const source2 = new Readable({ read() {} }); diff --git a/samples/parallelMap.js b/samples/parallelMap.js index 8d8d94c..a64efc4 100644 --- a/samples/parallelMap.js +++ b/samples/parallelMap.js @@ -1,4 +1,4 @@ -const strom = require("stromjs").strom(); +const strom = require("stromjs"); function sleep(time) { return time > 0 ? new Promise(resolve => setTimeout(resolve, time)) : null; diff --git a/samples/parse.js b/samples/parse.js index 2fd752a..3888ab4 100644 --- a/samples/parse.js +++ b/samples/parse.js @@ -1,5 +1,6 @@ -const strom = require("strom").strom(); +const strom = require("stromjs"); -strom.fromArray(['{ "a": "b" }']) +strom + .fromArray(['{ "a": "b" }']) .pipe(strom.parse()) .on("data", object => console.log(object)); diff --git a/samples/rate.js b/samples/rate.js index 78b255c..8fa7d09 100644 --- a/samples/rate.js +++ b/samples/rate.js @@ -1,4 +1,4 @@ -const strom = require("../dist/index.js"); +const strom = require("stromjs"); function sleep(time) { return time > 0 ? new Promise(resolve => setTimeout(resolve, time)) : null; diff --git a/samples/reduce.js b/samples/reduce.js index 53b4b60..874b925 100644 --- a/samples/reduce.js +++ b/samples/reduce.js @@ -1,6 +1,7 @@ -const strom = require("strom").strom(); +const strom = require("stromjs"); -strom.fromArray(["a", "b", "cc"]) +strom + .fromArray(["a", "b", "cc"]) .pipe(strom.reduce((acc, s) => ({ ...acc, [s]: s.length }), {})) .pipe(strom.stringify()) .pipe(process.stdout); diff --git a/samples/replace.js b/samples/replace.js index 90ce470..70f26c3 100644 --- a/samples/replace.js +++ b/samples/replace.js @@ -1,5 +1,6 @@ -const strom = require("strom").strom(); +const strom = require("stromjs"); -strom.fromArray(["a1", "b22", "c333"]) +strom + .fromArray(["a1", "b22", "c333"]) .pipe(strom.replace(/b\d+/, "B")) .pipe(process.stdout); diff --git a/samples/split.js b/samples/split.js index 467b5fe..80b2321 100644 --- a/samples/split.js +++ b/samples/split.js @@ -1,6 +1,7 @@ -const strom = require("strom").strom(); +const strom = require("stromjs"); -strom.fromArray(["a,b", "c,d"]) +strom + .fromArray(["a,b", "c,d"]) .pipe(strom.split(",")) .pipe(strom.join("|")) .pipe(process.stdout); diff --git a/samples/stringify.js b/samples/stringify.js index e9820cc..6022ae1 100644 --- a/samples/stringify.js +++ b/samples/stringify.js @@ -1,5 +1,6 @@ -const strom = require("strom").strom(); +const strom = require("stromjs"); -strom.fromArray([{ a: "b" }]) +strom + .fromArray([{ a: "b" }]) .pipe(strom.stringify()) .pipe(process.stdout); diff --git a/yarn.lock b/yarn.lock index 36ebbb8..99c19bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1934,9 +1934,6 @@ merge2@^1.2.3, merge2@^1.3.0: resolved "https://npm.dev.jogogo.co/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== -mhysa@./: - version "2.0.0-alpha.1" - micromatch@^4.0.2: version "4.0.2" resolved "https://npm.dev.jogogo.co/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" @@ -2719,6 +2716,9 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +stromjs@./: + version "0.5.1" + supertap@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/supertap/-/supertap-1.0.0.tgz#bd9751c7fafd68c68cf8222a29892206a119fa9e"