pointless-js

Functional point-free utilities for js

Usage no npm install needed!

<script type="module">
  import pointlessJs from 'https://cdn.skypack.dev/pointless-js';
</script>

README

Functional tree-shakeable point-free utilities for js

[WIP]

travis npm size coveralls code quality

code pen

Table of Contents

What is this?

It's a simple, typed and tree-shakeable collection of functional utilities for the JavaScript standard library.

If you need similar utilities for fetch - check out pointless-fetch.


Installation

npm:

npm i -S pointless-js

browser:

<!-- ES2015 -->
<script type="module">
  import * as P from 'https://unpkg.com/pointless-js';

  // use it here
</script>

<!-- ES5 with IE11+ general syntax polyfills, global object - `P` -->
<!-- Polyfill `window.Promise` and `Object.assign` yourself! -->
<script src="https://unpkg.com/pointless-js/dist/umd.js"></script>

Importing

// TS-module (pure typescript),
// allows compilation settings to be set from the project config
import * as P from 'pointless-js/src';

// ES-module (npm/node, typescript)
import * as P from 'pointless-js';

// ESNext (no polyfills for esnext)
import * as P from 'pointless-js/dist/esnext';

// ES-module (browser, node)
import * as P from 'https://unpkg.com/pointless-js';

// Classic node commonjs
const P = require('pointless-js/dist/js');

Something's missing or found a bug?
Feel free to create an issue! 😉