Skip to content

Commit

Permalink
added descriptions in docs tables of contents
Browse files Browse the repository at this point in the history
  • Loading branch information
webNeat committed Dec 11, 2016
1 parent be1e66b commit f11b5bc
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 99 deletions.
4 changes: 2 additions & 2 deletions build.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ function generate_docs_sommaire($module) {
*/
function generate_docs_sommaire_item($block) {
$title = get('name', $block);
$link = snakeCase('-', $title);
return "- [{$title}](#{$link})\n\n";
$link = lowerCase($title);
return "- [{$title}](#{$link}) {$block->summary}\n\n";
}

/**
Expand Down
4 changes: 2 additions & 2 deletions docs/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Generic common functions.

- [type](#type)
- [type](#type) Gets the type of the given argument.

- [toString](#to-string)
- [toString](#tostring) Converts a variable to its string value.

# type

Expand Down
19 changes: 11 additions & 8 deletions docs/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@

Functions dealing with functions.

- [curry](#curry)
- [curry](#curry) Returns a curried equivalent of the provided function.

- [__](#)
- [__](#__) Argument placeholder to use with curried functions.

- [apply](#apply)
- [apply](#apply) Apply the provided function to the list of arguments.

- [pipe](#pipe)
- [pipe](#pipe) Performs left-to-right function composition.

- [identity](#identity)
- [identity](#identity) A function that takes one argument and
returns exactly the given argument.

- [give](#give)
- [give](#give) Returns a function which whenever called will return the specified value.

- [all](#all)
- [all](#all) Takes many predicates and returns a new predicate that
returns `true` only if all predicates are satisfied.

- [any](#any)
- [any](#any) Takes many predicates and returns a new predicate that
returns `true` if any of the predicates is satisfied.

# curry

Expand Down
90 changes: 49 additions & 41 deletions docs/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,87 +2,95 @@

Useful functions to handle lists (arrays having only numeric keys).

- [map](#map)
- [map](#map) Curried version of `array_map`.

- [chain](#chain)
- [chain](#chain) Applies a function to items of the array and concatenates the results.

- [filter](#filter)
- [filter](#filter) Curried version of `array_filter` with modified order of arguments.

- [reduce](#reduce)
- [reduce](#reduce) Curried version of `array_reduce` with modified order of
arguments ($callback, $initial, $list).

- [each](#each)
- [each](#each) Applies the callback to each item and returns the original list.

- [head](#head)
- [head](#head) Returns the first item of the given array or string.

- [last](#last)
- [last](#last) Returns the last item of the given array or string.

- [init](#init)
- [init](#init) Returns all but the last element of the given array or string.

- [tail](#tail)
- [tail](#tail) Returns all but the first element of the given array or string.

- [reverse](#reverse)
- [reverse](#reverse) Alias of `array_reverse()` and `strrev()`.

- [length](#length)
- [length](#length) Alias for `count()` and `strlen()`.

- [allSatisfies](#all-satisfies)
- [allSatisfies](#allsatisfies) Checks if the `$predicate` is verified by **all** items of the array.

- [anySatisfies](#any-satisfies)
- [anySatisfies](#anysatisfies) Checks if the `$predicate` is verified by **any** item of the array.

- [concat](#concat)
- [concat](#concat) Concatenates two arrays or strings.

- [concatAll](#concat-all)
- [concatAll](#concatall) Concatenates a list of arrays or strings.

- [insert](#insert)
- [insert](#insert) Inserts an item at some position into an array or a substring into a string.

- [insertAll](#insert-all)
- [insertAll](#insertall) Same as `insert` but inserts an array instead of a single item.

- [append](#append)
- [append](#append) Appends an item to an array or a substring to a string.

- [prepend](#prepend)
- [prepend](#prepend) Inserts an item at the begining of an array or a substring at the begining of a string.

- [take](#take)
- [take](#take) Takes a number of elements from an array.

- [takeWhile](#take-while)
- [takeWhile](#takewhile) Takes elements from an array while they match the given predicate.

- [takeLastWhile](#take-last-while)
- [takeLastWhile](#takelastwhile) Same as `takeWhile` but taking elements from the end of the array.

- [takeUntil](#take-until)
- [takeUntil](#takeuntil) Takes elements from an array **until** the predicate
is satisfied, not including the satisfying element.

- [takeLastUntil](#take-last-until)
- [takeLastUntil](#takelastuntil) Same as `takeUntil` but takes elements from the end of the array.

- [remove](#remove)
- [remove](#remove) Removes a number of elements from an array.

- [removeWhile](#remove-while)
- [removeWhile](#removewhile) Removes elements from an array while they match the given predicate.

- [removeLastWhile](#remove-last-while)
- [removeLastWhile](#removelastwhile) Same as `removeWhile` but removes elements from the end of the array.

- [removeUntil](#remove-until)
- [removeUntil](#removeuntil) Removes elements from an array **until** the predicate
is satisfied, not removing the satisfying element.

- [removeLastUntil](#remove-last-until)
- [removeLastUntil](#removelastuntil) Same as `removeUntil` but removes elements from the end of the array.

- [fromPairs](#from-pairs)
- [fromPairs](#frompairs) Converts an array of (key, value) pairs to an object (instance of `stdClass`).

- [slices](#slices)
- [slices](#slices) Gets an array of slices of size `$size` from an array.

- [contains](#contains)
- [contains](#contains) Checks if an array contains an item.

- [findIndex](#find-index)
- [findIndex](#findindex) Returns the position/key of the first item satisfying the
predicate in the array or null if no such element is found.

- [findLastIndex](#find-last-index)
- [findLastIndex](#findlastindex) Returns the position/key of the last item satisfying the
predicate in the array or null if no such element is found.

- [find](#find)
- [find](#find) Returns the first item satisfying the predicate in
the array or null if no such element is found.

- [findLast](#find-last)
- [findLast](#findlast) Returns the last item satisfying the predicate in
the array or null if no such element is found.

- [indexOf](#index-of)
- [indexOf](#indexof) Returns the index of an item/substring in a list/string.

- [lastIndexOf](#last-index-of)
- [lastIndexOf](#lastindexof) Same as `indexOf` but returns the key/position/name of the last item/substring/attribute.

- [uniqueBy](#unique-by)
- [uniqueBy](#uniqueby) Removes duplicates from a list.

- [unique](#unique)
- [unique](#unique) Alias of `F\uniqueBy(F\equals())`.

- [groupBy](#group-by)
- [groupBy](#groupby) Converts an array to an associative array, based on the result of calling `$fn`
on each element, and grouping the results according to values returned.

# map

Expand Down
16 changes: 8 additions & 8 deletions docs/math.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

Basic Math functions.

- [plus](#plus)
- [plus](#plus) Computes `$x + $y`.

- [minus](#minus)
- [minus](#minus) Computues `$x - $y`.

- [negate](#negate)
- [negate](#negate) Computes `- $x`.

- [multiply](#multiply)
- [multiply](#multiply) Computes `$x * $y`.

- [divide](#divide)
- [divide](#divide) Computes `$x / $y`.

- [modulo](#modulo)
- [modulo](#modulo) Computes `$x % $y`.

- [sum](#sum)
- [sum](#sum) Computes the sum of an array of numbers.

- [product](#product)
- [product](#product) Computes the product of an array of numbers.

# plus

Expand Down
26 changes: 14 additions & 12 deletions docs/object.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,31 @@

Useful functions to handle objects (associative arrays are considered objects).

- [clone_](#clone)
- [clone_](#clone_) Returns a deep copy of the given value.

- [attributes](#attributes)
- [attributes](#attributes) Converts an object to an associative array containing public non-static attributes.

- [keys](#keys)
- [keys](#keys) Returns a list of array's keys or object's public attributes names.

- [values](#values)
- [values](#values) Returns a list of array's values or object's public attributes values.

- [has](#has)
- [has](#has) Checks if the given array or object has a specific key or public attribute.

- [get](#get)
- [get](#get) Gets the value of a key from an array or the
value of an public attribute from an object.

- [getPath](#get-path)
- [getPath](#getpath) Gets a value from an array/object using a path of keys/attributes.

- [set](#set)
- [set](#set) Returns a new array or object with the value of a key or a public attribute set
to a specific value.

- [satisfies](#satisfies)
- [satisfies](#satisfies) Checks if an attribute/value of an object/array passes the given predicate.

- [satisfiesAll](#satisfies-all)
- [satisfiesAll](#satisfiesall) Checks if a list of attribute/value of an object/array passes all the given predicates.

- [satisfiesAny](#satisfies-any)
- [satisfiesAny](#satisfiesany) Checks if a list of attribute/value of an object/array passes any of the given predicates.

- [toPairs](#to-pairs)
- [toPairs](#topairs) Converts an object or associative array to an array of [key, value] pairs.

# clone_

Expand Down
24 changes: 12 additions & 12 deletions docs/operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@

This file contains operators as functions.

- [and_](#and)
- [and_](#and_) Returns `$a && $b`.

- [or_](#or)
- [or_](#or_) Returns `$a || $b`.

- [not](#not)
- [not](#not) Returns `!$x`.

- [eq](#eq)
- [eq](#eq) Returns `$x == $y`.

- [notEq](#not-eq)
- [notEq](#noteq) Returns `$x != $y`.

- [eqq](#eqq)
- [eqq](#eqq) Returns `$x === $y`.

- [notEqq](#not-eqq)
- [notEqq](#noteqq) Returns `$x !== $y`.

- [equals](#equals)
- [equals](#equals) Returns `true` if the two elements have the same type and are deeply equivalent.

- [lt](#lt)
- [lt](#lt) Returns `$a < $b`.

- [lte](#lte)
- [lte](#lte) Returns `$a <= $b`.

- [gt](#gt)
- [gt](#gt) Returns `$a > $b`.

- [gte](#gte)
- [gte](#gte) Returns `$a >= $b`.

# and_

Expand Down
29 changes: 15 additions & 14 deletions docs/string.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,34 @@

This file contains some useful String functions.

- [split](#split)
- [split](#split) Curried version of `explode`.

- [join](#join)
- [join](#join) Curried version of `implode`.

- [replace](#replace)
- [replace](#replace) Curried version of `str_replace`.

- [regReplace](#reg-replace)
- [regReplace](#regreplace) Curried version of `preg_replace`.

- [upperCase](#upper-case)
- [upperCase](#uppercase) Alias of `strtoupper`.

- [lowerCase](#lower-case)
- [lowerCase](#lowercase) Alias of `strtolower`.

- [camelCase](#camel-case)
- [camelCase](#camelcase) Gets the camlCase version of a string.

- [snakeCase](#snake-case)
- [snakeCase](#snakecase) Gets the snake-case of the string using `$delimiter` as separator.

- [startsWith](#starts-with)
- [startsWith](#startswith) Checks if `$string` starts with `$token`.

- [endsWith](#ends-with)
- [endsWith](#endswith) Checks if `$string` ends with `$token`.

- [test](#test)
- [test](#test) Checks if a string matches a regular expression.

- [match](#match)
- [match](#match) Performs a global regular expression match
and returns array of results.

- [occurences](#occurences)
- [occurences](#occurences) Curried version of `substr_count` with changed order of parameters,

- [chunks](#chunks)
- [chunks](#chunks) Splits a string into chunks without spliting any group surrounded with some specified characters.

# split

Expand Down

0 comments on commit f11b5bc

Please sign in to comment.