pyslicer

1.0.2 • Public • Published

Python Like Array Slicer For JavaScript

Simple module to emulate the Python array slicer in JavaScript

How to use it

pySlicer python like slice

Use a string separated by ':' with this format 'start:stop:step' like function call if not provided they will default to 0, array.length, 1

import defineArray from "pyslicer"
/*or const defineArray = require("pyslicer")*/

let array = defineArray([1,2,3,5,6,7])

let sliced_array = array['1:2:3']

Readme

Keywords

Package Sidebar

Install

npm i pyslicer

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

2.62 kB

Total Files

3

Last publish

Collaborators

  • alexander_tux