Liking cljdoc? Tell your friends :D

Flathead

Build Status codecov Clojars Project

A Clojure library containing utility functions for nested objects. The purpose is to augment existing core functionality. This library also contains conversions to and from flat representation of a nested structure.

This library is divided to four parts:

  • flatten: conversions from nested objects to/from plain flat objects.
  • deep: utility functions for nested objects
  • plain: utility functions for plain objects
  • logic: logic related utility functions e.g. higher order logical functions
[flathead "0.0.7"]

Usage

Convert a flat object to a nested tree object:

(flatten/flat->tree {:a_x 1, :a_y 2 :b 3}) -> {a: {:x 1 :y 2} :b 3}

and its inverse - nested tree to a flat representation:

(flatten/tree->flat {a: {:x 1 :y 2} :b 3}) -> {:a_x 1, :a_y 2 :b 3}

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close