Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

kyanite

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kyanite

A small library of pure functional utilities to make life easier and data better

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.1K
increased by13.35%
Maintainers
1
Weekly downloads
 
Created
Source

npm David David Travis Coverage Status

Kyanite

A light weight pure functional library with single type utility functions and it only depends on itself.

JavaScript Style Guide

Contents

Changelog

You can view the changelog here: https://github.com/dhershman1/kyanite/blob/master/CHANGELOG.md

Credit

A lot of the if not most of the inpiration 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. This is where a lot of functionality, AND the idea of a pure single data type system came from I can't recommend it enough.
  • Ramdajs by Ramda a large and fairly handy library where the original idea sparked

Philosophy

The idea for Kyanite is to not just be another library but to introduce a pure single task functional experience. This is to keep things light, and optimal in terms of size and performance.

Working with the functional experience is working with immutable data, with this library I wanted to keep that as true as I could with using pure functions, but also in using single type data structures through out the library.

The goal for the library was to be stripped down, light weight and easy to understand intuitively. As well as being performant and optimized in the best ways possible, and I am happy with that current outcome.

Key Features

Some of the primary features for Kyanite are:

  • Purely Functional, this was a big thing for me I wanted it to be easy to use functional system but also I wanted everything to be completely pure. I am happy with the results.
  • Emphasis on single type utility functions, all of the functionality is (Theroetically) based around accepting a single data type (String, Array, Object, Number) doing what it does, and giving you back a result. Making it reliable and stable while also staying lightweight
  • Everything is curried! Setup static in one spot and then pass the rest of the dynamic data in later.
  • Modular! Despite the main minified file being 9.13kb (3.08kb gzipped) ontop of that the library is completely modular, allowing you to bring in single functions for use! Most functions (aside from say something like isEqual) are below 1kb (even smaller if you gzip) most of these are even below 500 Bytes! Making it easy and even lighter on your large scale applications!

How To

Standard module system

import kyanite from 'kyanite'

Common JS

const kyanite = require('kyanite')

Through the browser

<script src="path/to/kyanite/kyanite.min.js"></script>

Documentation

You can find the documentation here: https://www.dusty.codes/documentation/kyanite

Modular

Like lodash each method is importable by itself or desturctured from the main object. The benefit to being split up and importable individually is this helps out with tree shaking and only using the functionality you need at that time. Keeping builds smaller.

Examples:

Standard module system

import isEmpty from 'kyanite/isEmpty';

isEmpty({});

Common JS

const isEmpty = require('kyanite/isEmpty');

isEmpty({});

Through your browser

<script src="path/to/kyanite/isEmpty.js"></script>
<script>
  isEmpty({});
</script>

Keywords

FAQs

Package last updated on 11 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc