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

bukk

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bukk

A functional library for Norwegians

  • 0.10.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
37
increased by428.57%
Maintainers
1
Weekly downloads
 
Created
Source

bukk 🐐

A functional library for Norwegians.

Why?

Not exactly. Well, not only for Norwegians. Inspired by Ramda, this an automatically curried, data-last, functional JavaScript library.

Goals and philosophies

  • Declarative code
    Much favored over "smart" code. As an example it is preferred to use existing higher-order functions like Array.prototype.every() instead of reimplementing similar logic using loops.

  • Predictable behaviors
    B.map(B.inc, 1) should return 2. Not [], [undefined] or [2]. Just 2.

  • ES6 compliant
    It is totally fine to do B.map(B.inc, new Set([1, 2, 3])). This will simply return Set {2, 3, 4}.

  • Feature-rich
    As seen above, B.map knows how to handle Sets. Similarly, other B functions that can operate on Arrays, typically knows how to operate on other data structures as well.

Examples

const incList = B.map(B.inc)

incList([1, 2, 3])
// => [2, 3, 4]

const isFoo = B.equals('foo')
const allIsFoo = B.all(isFoo)

allIsFoo({x: 'foo', y: 'foo', z: 'foo'})
// => true

Usage

Install using yarn:

yarn add bukk

Or npm:

npm install --save bukk

Import module:

const B = require('bukk')

Or add the B variable to global scope:

<script src="nodule_modules/bukk/dist/bukk.js"></script>

Development

Install dependencies:

yarn install

Running tests

Test once:

yarn run test

Test in watch mode:

yarn run watch:test

"Bukk"?

"Bukk" means "ram" in Norwegian :)

Keywords

FAQs

Package last updated on 28 Jan 2017

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