Select.slice()

Get a slice of an array

Usage

Hover over inputs/exits for more info.

var Select = require('machinepack-select');


// Get a slice of an array

Select.slice({

collection: [],

start: 2,

end: 5,

include: true,

}).execSync();

Inputs

collection required

A collection

start required

A start index

2
end

end index

5
include

include the end of slice

true

Exits

error

An unexpected error occurred.

emptyError

Empty collection.

success

OK.

(varies based on provided inputs)