# curry(fn, args)

Return a curried version of the provided function.

Parameters

Name Types Description
fn Function - The function to be curried
args ...mixed - Arguments to apply towards the curried function

Returns

Function

The curried function

# is(constructr, obj)

Determine if a constructor created an object instance.

Parameters

Name Types Description
constructr mixed - The constructor to test against
obj mixed - The object instance to test against

Returns

Boolean

# isPropEq(prop, objs)

Determine if a number of objects share the same property value.

Parameters

Name Types Description
prop String Number
objs ...Object Array

Returns

Boolean

# contentType(obj)

Return the content "bucket" type that corresponds with the MIME-type of a request or response.

Parameters

Name Types Description
obj Request Response

Returns

String

The resulting "bucket type"

# getTypeHeader(obj)

Get the MIME-type of a request or response.

Parameters

Name Types Description
obj Request Response

Returns

String

The MIME-type header value

# isCacheableRequest(request)

Determine whether or not a request is "cacheable" based on an array of predicate functions. TODO: Can this be reduced to an allPass() utility?

Parameters

Name Types Description
request Request - The request instance to test

Returns

Boolean

# isCacheableURL(url)

Determine if a URL is "cacheable" or not.

Parameters

Name Types Description
url URL String

Returns

Boolean

# isGetRequest(req)

Determine if a request has a method of "GET" or not.

Parameters

Name Types Description
req Request - The request instance to test

Returns

Boolean

# isLocalURL(url)

Determine if a URL is "local" or not.

Parameters

Name Types Description
url URL - The URL instance to test

Returns

Boolean

# openCache(args)

Open a cache with a namedspaced key and return its promise. The supplied arguments will be combined with the VERSION constant to form a cache key for caches.open().

Parameters

Name Types Description
args ...String - One or more strings to construct the key value

Returns

Promise

The promise returned by `caches.open()`