New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

nv-array-range

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nv-array-range

nv-array-range ============ - nv-array-range - subview and range of array

latest
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

nv-array-range

  • nv-array-range
  • subview and range of array

install

  • npm install nv-array-range

usage

 const {Range,shuffle} = require("./index");

    

example

var ary = [10,20,30,40,50,60,70,80]
var range = new Range(ary)


> range
{
  ranges: [
      [0,8)
  ],
  view: [
    10, 20, 30, 40,
    50, 60, 70, 80
  ],
  ary: [
    10, 20, 30, 40,
    50, 60, 70, 80
  ]
}
>

> range.popat(3)
40
> range
{
  ranges: [
      [0,3),
      [4,8)
  ],
  view: [
    10, 20, 30, 50,
    60, 70, 80
  ],
  ary: [
    10, 20, 30, 40,
    50, 60, 70, 80
  ]
}
>

> range.popat(3)
Symbol(noexist)
>
> range.popat(6)
70
> range
{
  ranges: [
      [0,3),
      [4,6),
      [7,8)
  ],
  view: [ 10, 20, 30, 50, 60, 80 ],
  ary: [
    10, 20, 30, 40,
    50, 60, 70, 80
  ]
}
>

> range.popat(2)
30
> range.popat(5)
60
> range.popat(4)
50
> range
{
  ranges: [
      [0,2),
      [7,8)
  ],
  view: [ 10, 20, 80 ],
  ary: [
    10, 20, 30, 40,
    50, 60, 70, 80
  ]
}
>

METHODS

range.ary_                  range.constructor           range.popat
range.rngs_                 range.slcs_                 range.view_
range.vwlength_

API

  • ary_rng.noexist
  • ary_rng.Range(ary,si,ei)
  • ary_rng.shuffle(ary)

LICENSE

  • ISC

Keywords

array

FAQs

Package last updated on 20 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts