A light weight functional JavaScript library that only depends on itself.
Why The Name Kyanite?
Because I think mineral names are cool
Contents
Philosophy
The goal for Kyanite is to be stripped down, light weight, and intuitive. The idea is to be performant and easy to use in a functional setting, making it simple to build reusable functions in your code base with powerful and organized algorithmic pipes. Ultimately, Kyanite’s continued growth and improvement will support the growth and improvement of the JavaScript community
Key Features
- Purely Functional - This was a main focus for the project. I wanted it to be an easy to use, functional system while also being completely pure by making use of piping and transducers to boost performance.
- Single type utility functions - Theoretically, all of the functionality is based around accepting a single data type, doing what it does, and giving you back a result, thus making it reliable, stable, and lightweight.
- Everything is curried! Setup static in one spot and then pass the rest of the dynamic data in later.
- Data last ideology
How To
With a CDN
<script src="https://cdn.jsdelivr.net/npm/kyanite@latest/dist/kyanite.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/kyanite@latest/dist/kyanite.js"></script>
<script>
const K = kyanite
K.isEmpty({})
</script>
Or installing with npm i kyanite
and then:
Standard module system
import * as K from 'kyanite'
import * as K from 'kyanite/dist/kyanite.js'
Common JS
const K = require('kyanite')
const K = require('kyanite/dist/kyanite.js')
Local copy script tag
<script src="/path/to/dist/kyanite.min.js"></script>
<script src="/path/to/dist/kyanite.js"></script>
<script>
const K = kyanite
K.isEmpty({})
</script>
Testing
Kyanite follows the tap setup using the tape testing suite.
To run the tests:
git clone
the repocd
into the repo folder- Run
npm i
- Run
npm t
Credit
A lot of the if not most of the inspiration for this library came from 2 libraries I follow closely, Primarily most of it stems from:
- foreword by Abstract Tools which is a very nice and easy to use library developed by a close friend and mentor. This is where a lot of functionality ideas came from I can't recommend it enough.
- Ramdajs by Ramda a beautiful and feature packed library where the original idea started