kyuubi

0.1.0 • Public • Published

kyuubi

Working with Collections and Objects has never been so fun.

Motivation

Kyuubi has been written because I was feeling bored waiting for the next Orange is the Black's season, I wasn't happy with libs like underscore and I want to make some other design decisions, as follows:

  1. Haskell-inspired list and functions
  2. Tail-recursive
  3. Prototypal Pattern
  4. Extend native Objects (if necessary)
  5. Type-aware returns (functions always return the same data type)
  6. Ridiculously modular

It's actually not intended to be used in Real World™, even though I'm going to use it in my projects anyway. So, feel free to use it or contribute if you want to.

Getting Started

Kyuubi is available at npm, and you need to have installed/install Node.js in order to use it. Or you can download a UMD version at bower (but less fun and less modular, once you got the whole lib at once).

npm install kyuubi --save

Then you can start using it in a CommonJs environment. There's a couple of ways of using it:

  1. You can just extend native objects:
require('kyuubi').activate() // all native objects are extended
// or
require('kyuubi').activate(['array', 'object']) // only array and object are extended
  1. You can get different objects to use
 
require('kyuubi').get(['List', 'Record'])
 
var l = List.create()
Array.isArray(l) // => true
 
var r = Record.create() // => Object{functions...}
 

See the docs for comprehensive list of available Objects, Extensions and functions.

Contributing

It'd be awesome to have your feature into Kyuubi's collection. So, make a Pull Request following these steps:

  1. Look for a analogous feature at Kyuubi's docs.
  2. If there's none, fork it, create a branch for it.
  3. Pull request it.
  4. ????
  5. PROFIT!!!1

To be accepted, your feature must follow these requirements:

  1. Follow the current coding style (no semicolons, blablabla)
  2. Follow the design decisions once made (and listed above)
  3. Add docs if necessary

License

MIT

Package Sidebar

Install

npm i kyuubi

Weekly Downloads

2

Version

0.1.0

License

MIT

Last publish

Collaborators

  • jugoncalves