Hacker News new | ask | show | jobs
Show HN: Froebel–a strictly typed utility library for Deno, Node, and Browsers (github.com)
16 points by upzylon 1485 days ago
2 comments

Any feedback you might have would be appreciated. The library contains a bunch of utilities that I reuse between projects and thought might be worth sharing. What makes this library different from other utility libraries like e.g. Lodash is that I try to type arguments and return types as narrowly as possible. E.g.

    partition([1,'a',2,'b',3], (el): el is string => typeof el === 'string')
will return tuples of the type ['a','b'] and [1,2,3], not just generic arrays of type string[] and number[].

I just migrated the module to Deno and rewrote the test cases using the built-in Deno test runner. Also contributed a small bug fix to the test runner that I encountered during the migration.

This looks great! Love to see the Deno support growing

Will check it out for a personal tool I'm working on