constants

Functions that always return the same value

Source:

Methods

(inner) emptyArray() → {Array}

Returns an empty array

Source:
Returns:

Empty array

Type
Array
Example
emptyArray() //=> []
emptyArray('test') //=> []
emptyArray(true) //=> []

(inner) emptyObject() → {Object}

Returns an empty object

Source:
Returns:

Empty object

Type
Object
Example
emptyObject() //=> {}
emptyObject('test') //=> {}
emptyObject(true) //=> {}

(inner) emptyString() → {String}

Returns an empty string

Source:
Returns:

Empty string

Type
String
Example
emptyString() //=> ''
emptyString('test') //=> ''
emptyString(true) //=> ''

(inner) typeIs(typeName, testVal) → {Boolean}

Curried function that takes the string name of a data type per ramda#type, a value of any type, and returns a boolean to indicate whether or not the value is of specified type

Parameters:
Name Type Description
typeName String

name of the type to look for

testVal *

any value of any type

Source:
Returns:

Whether or not the value is of the specified type

Type
Boolean
Example
const isString = typeIs('String')
const isObject = typeIs('Object')

const insistentString = 'i AM a string'
const obj = { value: insistentString}

isString(insistentString) //=> true
isString(obj) //=> false

isObject(insistentString) //=> false
isObject(obj) //=> true