
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ts-sort-shell
Advanced tools
sync + callback + Promise + Async/Await style shellsort implementation in typescript
npm install ts-sort-shell --save-dev
yarn add ts-sort-shell -D
var shellSort = require("ts-sort-shell").shellSort;
shellSort([3,4,57,2,100,27,343],function(data){
console.log("shellSort cb",data.join('-'))// output: 2-3-4-27-57-100-343
})
var shellSortSync = require("ts-sort-shell").shellSortSync;
console.log('shellSortSync sync',shellSortSync([3,4,57,2,100,27,343]))// output: [2,3, 4, 27, 57,100,343]
var shellSortAsync = require("ts-sort-shell").shellSortAsync;
shellSortAsync([3,4,57,2,100,27,343]).then((res) => {
console.log('shellSortASync promise',res) // output: [2,3, 4, 27, 57,100,343]
}).catch((error) => {
console.log('err',error)
})
var shellSortAsyncW = require("ts-sort-shell").shellSortAsync;
(async function () {
var array4 = [3,4,57,2,100,27,343]
var les = await shellSortAsyncW(array4)
console.log('shellSortAsync await',les) // output: [2,3, 4, 27, 57,100,343]
})()
import { shellSort, shellSortSync, shellSortAsync } from 'ts-sort-shell'
shellSort([3,4,57,2,100,27,343],function(data){
console.log("shellSort cb",data.join('-'))// output: 2-3-4-27-57-100-343
})
console.log('shellSortSync sync',shellSortSync([3,4,57,2,100,27,343]))
shellSortAsync([3,4,57,2,100,27,343]).then((res) => {
console.log('shellSortASync promise',res) // output: [2,3, 4, 27, 57,100,343]
}).catch((error) => {
console.log('err',error)
})
(async function () {
var array4 = [3,4,57,2,100,27,343]
var les = await shellSortAsync(array4)
console.log('shellSortAsyncAwait await',les) // output: [2,3, 4, 27, 57,100,343]
})()
<script src="https://unpkg.com/ts-sort-shell@1.0.1/umd/index.js"></script>
tsSortShell.shellSort([3,4,57,2,100,27,343],function(data){
console.log("shellSort cb",data.join('-'))// output: 2-3-4-27-57-100-343
})
console.log('shellSortSync sync',tsSortShell.shellSortSync([3,4,57,2,100,27,343]))
tsSortShell.shellSortAsync([3,4,57,2,100,27,343]).then((res) => {
console.log('shellSortASync promise',res) // output: [2,3, 4, 27, 57,100,343]
}).catch((error) => {
console.log('err',error)
})
(async function () {
var array4 = [3,4,57,2,100,27,343]
var les = await tsSortShell.shellSortAsync(array4)
console.log('shellSortAsyncAwait await',les) // output: [2,3, 4, 27, 57,100,343]
})()
FAQs
shell sort an array in typescript
We found that ts-sort-shell demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.