no-more-hatsdeprecated

Yet another declarative/functional library.

Usage no npm install needed!

<script type="module">
  import noMoreHats from 'https://cdn.skypack.dev/no-more-hats';
</script>

README

No More Hats

(Because we definitely don't have enough declarative, general-purpose modules.)

⚠️ THIS LIBRARY DOES NOT WORK AT THE MOMENT ⚠️

(I published it just to familiarize myself with NPM and I don't know how to un-publish it.)

No More Hats is a general-purpose JavaScript library.

Usage

None of this has actually been implemented because I'm a lazy functional programmer.

const {safeGet} = require('no-more-hats')
const safeFirstLength = xs => safeGet(xs, 0, 'length')
console.log(safeFirstLength([1, 2, 3])) // Nothing
console.log(safeFirstLength([[1, 2, 3], 4, 5])) // Just(3)

Features

  • Efficiently perform common operations like cloning
  • Easily handle errors without messiness like try/catch

Installation

If you have npm, it's as simple as one command:

npm install no-more-hats -g

Contribute

License

The project is licensed under the MIT license.