~sthagen/konfiguroida

Confiture (Finnish konfiguroida) with whole fruits - data oriented programming for configuration and friends.
55beeb2b — Stefan Hagen 10 months ago
Migrated the docs configuration towards two column layout and simplified repository link text in docs
c4f1c15e — Stefan Hagen 11 months ago
Reworded amendment
4770aace — Stefan Hagen 11 months ago
Hint at the possibility to leave out the final placeholder

refs

default
browse  log 
v2021.11.9
browse  .tar.gz 

clone

read-only
https://git.sr.ht/~sthagen/konfiguroida
read/write
git@git.sr.ht:~sthagen/konfiguroida

You can also use your local clone with git send-email.

#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 npm
❯ npm install konfiguroida

# using yarn
❯ yarn 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.