glider-lib
v0.1.1
Published
Functional library for TestGlider
Downloads
3
Readme
Glider Library
GliderLib is a collection of functions built using Ramda and SanctuaryJS that make it easier and safer to query and manipulate data related to TestGlider
All functions within GliderLib are attached to the Glider (G) object and returned when loaded.
Getting Started
To start using GliderLib all you to do is:
yarn add glider-lib
The in the Javascript:
const G = require('glider-lib')(true) // true for typechecking
const allIssuesinModules = R.compose( G.getIssues, G.getResults, G.getModules )(TestCycle)
const newPage = G.newPage( {id: 4, name: 'Homepage'} )
const newTestDoc = G.putPage(newPage)
Function groups (Modules):
NEW
Used for constructing new types out of plain objects
IN
Includes a set of composable lens functions for scoping into data
GET
Functions for grabbing objects out of other objects
SET
A setter will overwrite a field with the provided data
FIND
Find functions are build upon R.find and are used for filtering
PUT
A put function will either replace when another unique record is found or add it to the list
REMOVE
functions for removing objects
LIST
functions for breaking down data into compact lists
SORT
Sorting functions
LINK
LINK functions are used for attaching related data to another record
Docs
The following section is autogenerated using santcuary-spec functions.
AutoDoc
Types (?)
Functions (36/72)
- newIssue [ Object -> glider/Issue ]
- newResult [ Object -> glider/Result ]
- newModule [ Object -> glider/Module ]
- newPage [ Object -> glider/Page ]
- newProject [ Object -> glider/Project ]
- newTestCycle [ Object -> glider/TestCycle ]
- inModules [ Function -> Function ]
- inPages [ Function -> Function ]
- inResults [ Function -> Function ]
- inIssues [ Function -> Function ]
- onIfIs [ String -> String -> String -> Function ]
- onStatusIfChanged [ Function -> Function ]
- onStatusIfChanged [ Function -> Function ]
- isModule [ glider/Sector -> Boolean ]
- isPage [ glider/Sector -> Boolean ]
- getModules [ glider/Document -> Array ]
- getPages [ glider/Document -> Array ]
- getSectors [ glider/Document -> Array ]
- getResults [ glider/Sector -> Array ]
- getIssues [ glider/Result -> Array ]
- getStatus [ Object -> String ]
- getIndex [ sanctuary-def/Any -> sanctuary-def/Any -> Number ]
- getModule [ glider/Module -> glider/Document -> glider/Module ]
- getPage [ glider/Page -> glider/Document -> glider/Page ]
- getSector [ glider/Sector -> glider/Document -> glider/Sector ]
- getResult [ glider/Result -> glider/Sector -> glider/Result ]
- getIssue [ glider/Issue -> glider/Result -> glider/Issue ]
- putModule [ glider/Module -> glider/Document -> glider/Document ]
- putPage [ glider/Page -> glider/Document -> glider/Document ]
- putResult [ glider/Result -> glider/Document -> glider/Document ]
- putResult [ glider/Issue -> glider/Document -> glider/Document ]
- removeModule [ glider/Module -> glider/Document -> glider/Document ]
- removePage [ glider/Page -> glider/Document -> glider/Document ]
- removeSector [ glider/Sector -> glider/Document -> glider/Document ]
- removeResult [ glider/Result -> glider/Document -> glider/Document ]
- removeIssue [ glider/Issue -> glider/Document -> glider/Document ]