Fundot utilities
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
test
.gitignore
.travis.yml
LICENSE
index.js
package.json
readme.md

readme.md

Fundot Utilities

Utilities for the functional library Fundot

build status

Example

var utils = require('fundot-utils')

console.log(utils.isArrayLike({}))
console.log(utils.isObject([]))
console.log(utils.slice([1, 2, 3], 2))
console.log(utils.toArray(1))
$ node example/utils.js
false
false
[ 3 ]
[ 1 ]

Methods

var utils = require('fundot-utils')

utils.isArrayLike(arg)

Checks if the given argument is an array like object. If the argument contains a length property that's type is a number, it will return true.

utils.isObject(object)

Checks if the given argument is a true object. If the argument is a true object then it returns true.

utils.slice(array, number)

Uses Array.prototype.slice directly.

utils.toArray(arguments)

Creates an array from given arguments and returns it.

Install

With npm do:

npm install fundot-utils

License

MIT