Skip to content

add is.length, is.longerThan, and is.shorterThan #12

@mrDarcyMurphy

Description

@mrDarcyMurphy

Wrap javascript's stock length attribute for usage in the-thing-is.

var foo = 'bar'
var fizz = ['buzz', 'fizzbuzz']
var empty = []

is.length(foo) // true - greater than 0 length
is.length(foo, 3) // true - length is 3
is.length(foo, 2) // false - length is not 2

is.length(fizz) // true
is.length(fizz, 2) // true

is.length(empty) // false

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions