Skip to content

Commit

Permalink
refactor(examples): replace hex() => radix(), update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Aug 8, 2018
1 parent b1ea9a5 commit 6a0db9c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions examples/hdom-benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@thi.ng/hdom": "latest",
"@thi.ng/hdom-components": "latest",
"@thi.ng/rstream": "latest",
"@thi.ng/strings": "latest",
"@thi.ng/transducers": "latest"
}
}
6 changes: 3 additions & 3 deletions examples/hdom-benchmark/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { start } from "@thi.ng/hdom";
import { dropdown } from "@thi.ng/hdom-components/dropdown";
import { fromRAF } from "@thi.ng/rstream/from/raf";
import { Stream } from "@thi.ng/rstream/stream";
import { radix } from "@thi.ng/strings/radix";
import { comp } from "@thi.ng/transducers/func/comp";
import { hex } from "@thi.ng/transducers/func/hex";
import { range } from "@thi.ng/transducers/iter/range";
import { iterator } from "@thi.ng/transducers/iterator";
import { benchmark } from "@thi.ng/transducers/xform/benchmark";
Expand All @@ -13,8 +13,8 @@ import { movingAverage } from "@thi.ng/transducers/xform/moving-average";
import { partition } from "@thi.ng/transducers/xform/partition";

// pre-defined hex formatters
const hex4 = hex(4);
const hex6 = hex(6);
const hex4 = radix(16, 4);
const hex6 = radix(16, 6);

/**
* Single box component. Uses given id to switch between using `div` or
Expand Down
1 change: 1 addition & 0 deletions examples/svg-particles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
},
"dependencies": {
"@thi.ng/hdom": "latest",
"@thi.ng/strings": "latest",
"@thi.ng/transducers": "latest"
}
}
4 changes: 2 additions & 2 deletions examples/svg-particles/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { start } from "@thi.ng/hdom";
import { hex } from "@thi.ng/transducers/func/hex";
import { radix } from "@thi.ng/strings/radix";
import { repeatedly } from "@thi.ng/transducers/iter/repeatedly";

const width = window.innerWidth;
const height = window.innerHeight;
const hex6 = hex(6);
const hex6 = radix(16, 6);

const updateParticle = (p, v) => {
let x = p.cx + v[0];
Expand Down

0 comments on commit 6a0db9c

Please sign in to comment.