New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

array-move

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-move - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

7

index.d.ts

@@ -12,3 +12,3 @@ declare const arrayMove: {

```
import arrayMove from 'array-move';
import arrayMove = require('array-move');

@@ -37,4 +37,7 @@ const input = ['a', 'b', 'c'];

mutate(array: unknown[], from: number, to: number): void;
// TODO: Remove this for the next major release
default: typeof arrayMove;
};
export default arrayMove;
export = arrayMove;
'use strict';
const arrayMoveMutate = (array, from, to) => {
array.splice((to < 0 ? array.length + to : to), 0, array.splice(from, 1)[0]);
array.splice(to < 0 ? array.length + to : to, 0, array.splice(from, 1)[0]);
};

@@ -14,4 +14,5 @@

module.exports = arrayMove;
// TODO: Remove this for the next major release
module.exports.default = arrayMove;
module.exports.mutate = arrayMoveMutate;
{
"name": "array-move",
"version": "2.0.0",
"version": "2.1.0",
"description": "Move an array item to a different position",

@@ -16,3 +16,3 @@ "license": "MIT",

"scripts": {
"test": "xo && ava && tsd-check"
"test": "xo && ava && tsd"
},

@@ -31,6 +31,6 @@ "files": [

"devDependencies": {
"ava": "^1.3.1",
"tsd-check": "^0.6.0",
"ava": "^1.4.1",
"tsd": "^0.7.1",
"xo": "^0.24.0"
}
}
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