pineapplemachine / higher

Lazy and async higher-order functions in JavaScript.
Other
3 stars 0 forks source link

Split functions and returned sequence types in test/sequenceTools.js into separate files #160

Open pineapplemachine opened 7 years ago

pineapplemachine commented 7 years ago

Currently the file contains lots of things, like unknownLength/UnknownLengthSequence and makeUnidirectional/UnidirectionalSequence. These should each be moved into their own files inside the test directory and sequenceTools.js should be removed.

See https://github.com/pineapplemachine/higher/pull/158#discussion_r136878213

To prevent existing code from breaking it will be necessary to also remove the sequenceTools import in higher.js and add an import for every file separated out in this way.

jpsullivan commented 7 years ago

I actually don't think you'd have to remove the sequenceTools imports at all if you made it simply export each new file.

For example, after splitting it into separate files, this one would now look like...

export * as NonSlicingInput from './nonSlicing';
export * as BoundsUnknownSequence from './boundsUnknown';
...

Think will still let you import everything at once, and won't require any changes to your other files.

pineapplemachine commented 7 years ago

sequenceTools is only imported by one file, it would be cleaner for that one file to just import all the new ones instead.

jpsullivan commented 7 years ago

And here I was thinking it was used everywhere lol. Carry on!