TupleJS
Getting Started
$ npm i --save touplejs
Usage
// ResponseStatus('ok', {data: {someData: 3}})const ResponseStatus = const apiResponse = const serverResp = serverResp // false const error = serverRespconst status data = apiResponse
Methods
Tuple - Used to create a tuple
(types) -> Function
Allows creation of tuples with type saftey
For demo's I will be using a Name
tuple (Tuple(String, String)
)
map
const myName = myName
reduce
const myName = myName // 'SteveJobs'
equals
// false
length
length // 2