diff --git a/README.md b/README.md index 786cc92..39606ec 100644 --- a/README.md +++ b/README.md @@ -68,13 +68,6 @@ console.log( // ] ``` -# Demo - -You can try this library: - -- either directly [in your browser](https://repl.it/@ehmicky/fast-cartesian). -- or by executing the [`examples` files](examples/README.md) in a terminal. - # Install ``` diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index 4597082..0000000 --- a/examples/README.md +++ /dev/null @@ -1,5 +0,0 @@ -This directory contains [examples](main.js) of this library. They can be run and -edited: - -- either directly [in your browser](https://repl.it/@ehmicky/fast-cartesian) -- or in a terminal by cloning this repository diff --git a/examples/main.js b/examples/main.js deleted file mode 100644 index 8604faa..0000000 --- a/examples/main.js +++ /dev/null @@ -1,37 +0,0 @@ -// Demo of `fast-cartesian`. -// This file can be directly run: -// - first install `fast-cartesian` -// - then `node node_modules/fast-cartesian/examples/main.js` -// An online demo is also available at: -// https://repl.it/@ehmicky/fast-cartesian - -import fastCartesian from 'fast-cartesian' - -console.log( - fastCartesian([ - ['red', 'blue'], - ['circle', 'square'], - ]), -) -// [ -// [ 'red', 'circle' ], -// [ 'red', 'square' ], -// [ 'blue', 'circle' ], -// [ 'blue', 'square' ] -// ] - -// Returning initial indexes -console.log( - fastCartesian( - [ - ['red', 'blue'], - ['circle', 'square'], - ].map(Object.entries), - ), -) -// [ -// [ [ '0', 'red' ], [ '0', 'circle' ] ], -// [ [ '0', 'red' ], [ '1', 'square' ] ], -// [ [ '1', 'blue' ], [ '0', 'circle' ] ], -// [ [ '1', 'blue' ], [ '1', 'square' ] ] -// ]