1
0
Fork 0
Confiture (Finnish konfiguroida) with whole fruits - data oriented programming for configuration and friends. https://codes.dilettant.life/docs/konfiguroida
 
Go to file
Stefan Hagen 55beeb2b1a
Migrated the docs configuration towards two column layout and simplified repository link text in docs
2022-11-06 15:37:14 +01:00
docs Reworded amendment 2022-10-10 22:04:15 +02:00
src Grouped similar if branches 2022-10-10 21:53:55 +02:00
tests Added more tests for corner cases and to document current behavior 2021-11-07 19:32:28 +01:00
.editorconfig Updated editor config 2022-04-30 23:09:19 +02:00
.gitattributes End of line sanity across platforms (LF) 2022-06-19 11:25:20 +02:00
.gitignore Added local artifacts from publishing of documentation to git ignores 2022-07-27 19:04:31 +02:00
LICENSE Bumped year in license file 2022-07-27 19:03:39 +02:00
README.md Patched README and docs landing page to provide the original codeberg blurb from https://docs.codeberg.org/getting-started/what-is-codeberg/ 2022-08-15 13:08:26 +02:00
mkdocs.yml Migrated the docs configuration towards two column layout and simplified repository link text in docs 2022-11-06 15:37:14 +01:00
package.json Synced release version across docs and packaging config 2022-10-10 21:59:20 +02:00

README.md

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.