konfiguroida

2022.10.10 • Public • Published

Konfiguroida

Confiture (Finnish konfiguroida) with whole fruits - data oriented programming for configuration and friends.

License: MIT

npm version npm

Documentation

User and developer documentation of konfiguroida.

Bug Tracker

Feature requests and bug reports are bested entered in the todos of konfiguroida.

Primary Source repository

The primary source of konfiguroida lives somewhere on a mountain in Central Switzerland. But, we use decentralized version control (git), so any clone can become the source to everyone's benefit, no central only code. Anyway, the preferred public clones of konfiguroida are:

  • on codeberg - a democratic community-driven, non-profit software development platform operated by Codeberg e.V.
  • at sourcehut - a collection of tools useful for software development.

Installation

# using npmnpm install konfiguroida

# using yarnyarn add konfiguroida

Usage

// using require
const { cook, partial } = require('konfiguroida')

// using import
import { cook, partial } from 'konfiguroida'

Example

// Some population to sample from:
const FRUITS = ['apples', 'currants', 'oranges', 'peaches', 'pears']

// Preparing the kitchen for cooking confitures from diverse fruits:
const cookFrom = partial(cook, FRUITS)
const cookFromFruits = partial(cookFrom, 'fruits')
const cookFromFruitsConfiture = partial(cookFromFruits, 'confiture')

// Cook the confitures:
const confitures = cookFromFruitsConfiture([
  [{size: 'XXS'}, ['currants']], 
  [{size: 'XXL'}, null]
])
console.log(confitures)
//[
//  { confiture: { size: 'XXS' }, fruits: [ 'currants' ] },
//  {
//    confiture: { size: 'XXL' },
//    fruits: [ 'apples', 'oranges', 'peaches', 'pears' ]
//  }
//]

Status

Experimental.

Note: The default branch is default.

Package Sidebar

Install

npm i konfiguroida

Weekly Downloads

2

Version

2022.10.10

License

MIT

Unpacked Size

26 kB

Total Files

14

Last publish

Collaborators

  • dilettant