Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@andersaloof/sub-array

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@andersaloof/sub-array - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

index.js

@@ -11,3 +11,3 @@ function subArray(items, current, range) {

items.slice(Math.max(0, current - limitedRange), Math.min(items.length, current + limitedRange + 1)),
current + limitedRange >= items.length ? items.slice(0, (current + limitedRange) - items.length + 1) : [], // Prepent items from the beginning of the array
current + limitedRange >= items.length ? items.slice(0, (current + limitedRange) - items.length + 1) : [] // Prepend items from beginning of array
);

@@ -14,0 +14,0 @@ }

{
"name": "@andersaloof/sub-array",
"description": "Returns a subset of an array, from index + X items before/after the current index, wrapping around if range exceeds the bounds of the array.",
"version": "1.0.0",
"version": "1.0.1",
"main": "index.js",

@@ -9,3 +9,3 @@ "browser": "index.js",

"devDependencies": {
"tape": "~4.9.1"
"tape": "^5.0.1"
},

@@ -12,0 +12,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc