Class

SuperRangeObject

SuperRangeObject()

Defines a consistent interface for each of the range object types to inherit from, provides some array methods.

Constructor

# new SuperRangeObject()

Methods

# filter(…args)

Converts range to an Array and then calls filter(...args) on it.

Parameters:
Name Type Attributes Description
args any <repeatable>

Same args as you would pass to Array#filter

# slice(startopt, endopt)

Generate array from range starting at value start and ending at value end via nthValue.

Parameters:
Name Type Attributes Default Description
start number <optional>
0

index to start slice

end number <optional>

index to end slice, return rest of array if not provided.