{"_id":"@bemoje/arr-swap","_rev":"5-d34ffa0e86e1d3fd8c389b10e597e3aa","name":"@bemoje/arr-swap","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@bemoje/arr-swap","version":"1.0.0","keywords":["swap","array","elements","place","runtime","o1","arr","modified","index","element","2nd","arrswap"],"author":{"url":"https://github.io/bemoje/","name":"Benjamin M. Jensen","email":"bemoje@gmail.com"},"license":"MIT","_id":"@bemoje/arr-swap@1.0.0","maintainers":[{"name":"bemoje","email":"bemoje@gmail.com"}],"homepage":"https://github.com/bemoje/bemoje-arr-swap#readme","bugs":{"url":"https://github.com/bemoje/bemoje-arr-swap/issues","email":"bemoje@gmail.com"},"dist":{"shasum":"2fbf3bbf8114400e6390737dcb696443cdf8d7a8","tarball":"https://registry.npmjs.org/@bemoje/arr-swap/-/arr-swap-1.0.0.tgz","fileCount":5,"integrity":"sha512-Y5GBEPFlcGyW2nC9jRIGM7DonILgKQDNuH/+ZA86PWmUe3R5SSCeolYx9QIkZaLuU+SbUmHmuXCoK9y+bdGDrA==","signatures":[{"sig":"MEUCIQDOwjDGmkhzVUD0YIIR8ASxRsktNJTQLMC/RoNpgHsm+gIgXulLgc9d8ES+fcZKJbNSR6lfno3R28tpyov9N7hF+7w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepN45CRA9TVsSAnZWagAAVwwP/01U1OO7o7rIfgSm+Zi3\ng/kiWsIh5fYJCfHekNCCUK0oV9CtwowySRK1aIcGUBTb/QvrkHzed/jzDnTK\niYp2n6qAMx28Ipj/fGI6lmdhGp6KnYgijksS064UXAsUKpLsE5vwmyyEzaNj\n9Ifc0XFPvw5akmNV1i8V8Krgq0tWw73DgW4yMV6ZcRL1l4LREXNmsVxwXR1F\ndwrlswRFMY5jOoqeh5nb5O66MueW0p9nBYkUelLi1/u2/4P5Pqfe1sZdMq0N\ntvVYKc6798x4vAhScRHM+qBmu04PxPRQJZDU30MaayZhGWH7dlDwtN6YVvwS\nYuBE0ErhmHdii9PSI63c09fWeLSJsFd8E0duGwUUYRlsN+Np2gZippAU6zzv\no+LZmdtlMERljw7i26FQqj9fpweXhpCL0NT3f5aRaqJpmnoU0yDUvLui2g+y\nLfVSEKAwbE+hhDRED5Bie2nmbgiI2h51Q4o/qmBkHpSR579C1sTaH7aVUxHn\nogJZXrhr5bYSvsm3W8xjVnN/nGV/XQvQrlPZMsxyYPqE4v/VGZ/ujrKQ57XA\nvDabsJ5RUDCubFD8j8O80P05kdnfHNIqv90MZBHj23jbHtLCKL6owdEmWmui\niS2dA92+hYEjH26RxmmVJsw18ZmTGx+Lqzwq8RTW4lEXxGoIrC/kiA1+FwJw\nl8Vg\r\n=mO4A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/arr-swap.umd.js","github":{"user":"bemoje"},"module":"dist/arr-swap.esm.js","browser":"dist/arr-swap.umd.js","scripts":{"docs":"documentation build src/** -f md -o docs/api.md && documentation build src/** -f html -o docs","repo":"node -r esm scripts/repo.js","test":"jest","bench":"node -r esm benchmark/arr-swap.benchmark.js","build":"npm run test && npm run bench && npm run rollup && npm run docs && npm run description && npm run keywords && npm run readme","clean":"rimraf","major":"npm run repo bumpVersionMajor","minor":"npm run repo bumpVersionMinor","patch":"npm run repo bumpVersionPatch","commit":"npm run repo gitCommit","readme":"npm run repo writeReadme","rename":"npm run repo rename","rollup":"rollup -c","example":"node -r esm examples/arr-swap.example.js","publish":"npm run repo npmPublish","version":"npm run repo version","keywords":"npm run repo keywords","git-create":"rimraf .git && npm run repo gitCreate","git-delete":"rimraf .git && bash scripts/github-delete.sh bemoje bemoje-arr-swap","description":"npm run repo description"},"_npmUser":{"name":"bemoje","email":"bemoje@gmail.com"},"repository":{"url":"git+https://github.com/bemoje/bemoje-arr-swap.git","type":"git"},"_npmVersion":"6.12.1","description":"Swap array elements in place. Runtime: O(1)","directories":{},"_nodeVersion":"12.13.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","jest":"^24.9.0","path":"^0.12.7","rimraf":"^3.0.2","rollup":"^1.32.1","fs-extra":"^9.0.0","hirestime":"^6.0.1","walk-sync":"^2.1.0","babel-core":"^6.26.3","babel-jest":"^25.4.0","documentation":"^12.3.0","babel-preset-env":"^1.7.0","keyword-extractor":"0.0.18","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0"},"_npmOperationalInternal":{"tmp":"tmp/arr-swap_1.0.0_1587863096922_0.06702717181954787","host":"s3://npm-registry-packages"},"deprecated":"Package is not maintained."},"1.0.1":{"name":"@bemoje/arr-swap","version":"1.0.1","keywords":["swap","array","elements","place","runtime","o1","arr","modified","index","element","2nd","arrswap"],"author":{"url":"https://github.io/bemoje/","name":"Benjamin M. Jensen","email":"bemoje@gmail.com"},"license":"MIT","_id":"@bemoje/arr-swap@1.0.1","maintainers":[{"name":"bemoje","email":"bemoje@gmail.com"}],"homepage":"https://github.com/bemoje/bemoje-arr-swap#readme","bugs":{"url":"https://github.com/bemoje/bemoje-arr-swap/issues","email":"bemoje@gmail.com"},"dist":{"shasum":"bdf993e406bcb65c772f84337904642d84cfc552","tarball":"https://registry.npmjs.org/@bemoje/arr-swap/-/arr-swap-1.0.1.tgz","fileCount":5,"integrity":"sha512-ZOBGD+KndLG22zw3t8D1xwvSrBGGbR9n7ymHc/vzN57nqxTZwGhhwL6SPrZoyrRLK54E5D+JWQI12A06M6d4rA==","signatures":[{"sig":"MEYCIQDXlS+8i4pLcl6wjGYMiLfXywM6evJA3JCr145DrDDE5wIhAKkbrNFItCjre59ARIwUxcbnxs2tly9F0ZBWiLjqv+TB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepN6VCRA9TVsSAnZWagAA1PAQAI++4hm45AZWtQXPmQ86\ni+pcnoukhminHwxdfWeFd8hOXJdZIMTpqqxbnzquNPpd4MJpfZZLmIogxHZZ\nV0wLP9KmZNcRcyG1Aa26wYQ0hGFafrLFHN1bHk8xZ++YtR6T8i0nJW+pRO6k\n6Gird2Z8NHZsXPZjxoTWpAaY3DjowBRifigoM3nLglFR1A9loM94pSgujdaX\nBR/4PZ+hKlKdz4gHU3oX4XgbuN62w7izUVCkXYYIBg/V+vONCTgktIji+asy\noJMRqa/lPSgqGC3OLU3fGkHhqoTxftveki9ZEWnyuYNStqRBJFNjWBBL7ap2\n/ASeaRTjK5JYC1OlCpe4ZtSQ+eGyJfbRFS2bOpahjuG9wFfvHd5DBngxZEcN\n4GNWb74O8Ooxt/vbIn9LSGZuNjN5OapEoxj+cjk6x2SPW7xlgt/fyiNg62pC\nQF9WZkR2ciqc7hriZTqqNfwFHHjKC+Z6bqYFMJJ6bqfKeCDWWeoJn5IqFCOg\nkotapwUGgx+AihQuaNXiHN9QixBrNxa6bE+yemD9mEL7QAg5v2yFqKo1TIk9\nxwgTq1/atABvtlqJmqJfBhfySHLivZAQrqzr6DbLvUJD8ycihCw4kdU1Sv9W\n+uo0gUkZjR9QcC8jKzKN5PO3W8ntGfbS6V02gH3yc/ZmTSUR4uBraXVz24pV\nMtlE\r\n=Sow2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/arr-swap.umd.js","github":{"user":"bemoje"},"module":"dist/arr-swap.esm.js","browser":"dist/arr-swap.umd.js","gitHead":"e9d8c5599c156003c7874ca3ab6bc4ff1b3d6653","scripts":{"docs":"documentation build src/** -f md -o docs/api.md && documentation build src/** -f html -o docs","repo":"node -r esm scripts/repo.js","test":"jest","bench":"node -r esm benchmark/arr-swap.benchmark.js","build":"npm run test && npm run bench && npm run rollup && npm run docs && npm run description && npm run keywords && npm run readme","clean":"rimraf","major":"npm run repo bumpVersionMajor","minor":"npm run repo bumpVersionMinor","patch":"npm run repo bumpVersionPatch","commit":"npm run repo gitCommit","readme":"npm run repo writeReadme","rename":"npm run repo rename","rollup":"rollup -c","example":"node -r esm examples/arr-swap.example.js","publish":"npm run repo npmPublish","version":"npm run repo version","keywords":"npm run repo keywords","git-create":"rimraf .git && npm run repo gitCreate","git-delete":"rimraf .git && bash scripts/github-delete.sh bemoje bemoje-arr-swap","description":"npm run repo description"},"_npmUser":{"name":"bemoje","email":"bemoje@gmail.com"},"repository":{"url":"git+https://github.com/bemoje/bemoje-arr-swap.git","type":"git"},"_npmVersion":"6.12.1","description":"Swap array elements in place. Runtime: O(1)","directories":{},"_nodeVersion":"12.13.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","jest":"^24.9.0","path":"^0.12.7","rimraf":"^3.0.2","rollup":"^1.32.1","fs-extra":"^9.0.0","hirestime":"^6.0.1","walk-sync":"^2.1.0","babel-core":"^6.26.3","babel-jest":"^25.4.0","documentation":"^12.3.0","babel-preset-env":"^1.7.0","keyword-extractor":"0.0.18","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0"},"_npmOperationalInternal":{"tmp":"tmp/arr-swap_1.0.1_1587863188590_0.05185568912279792","host":"s3://npm-registry-packages"},"deprecated":"Package is not maintained."},"1.0.2":{"name":"@bemoje/arr-swap","version":"1.0.2","keywords":["swap","array","elements","place","runtime","o1","arr","modified","index","element","2nd","arrswap"],"author":{"url":"https://github.io/bemoje/","name":"Benjamin M. Jensen","email":"bemoje@gmail.com"},"license":"MIT","_id":"@bemoje/arr-swap@1.0.2","maintainers":[{"name":"bemoje","email":"bemoje@gmail.com"}],"homepage":"https://github.com/bemoje/bemoje-arr-swap#readme","bugs":{"url":"https://github.com/bemoje/bemoje-arr-swap/issues","email":"bemoje@gmail.com"},"dist":{"shasum":"7d6993f086dd574085a186eda43a56c37be5f241","tarball":"https://registry.npmjs.org/@bemoje/arr-swap/-/arr-swap-1.0.2.tgz","fileCount":5,"integrity":"sha512-zfioEdk2/4JJrqn2aGMCy+a7j9afSutxWhmUhq6sjP78JU+mD70NU1+Yf0q0NBkbPPSpmiYnAwLTCoG9vv1nIw==","signatures":[{"sig":"MEYCIQD0PDIPN0ztiwnpW1w6HcjoTp7+7wwkMOfaQRAkJiIIcgIhANc8ExIO9DcpZm7iMJT59LJtl+SEjgFhCGqYNrlhILWZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqsIHCRA9TVsSAnZWagAATYMP/iquUkynu1aSg6HPbRJ4\nlY3KER9PPUcIY3o4Mtw2azAqYpJFsMhMmcpW8jIngp6+tgYVo+X7z81JfwFl\nHw7P6Hu5LMqZN/fmyfIOO98OvJs4kumRgTaCP48FeSyH97mhST90fzwmfj10\nUJgLvqiIvMTGpKindbUuCOMv6KssPN4tAuzKW8iP11bUsESAjZl5+f8HL48W\ntgBSQrGTSWVg94INxCUkSBGkgjF9sa1KcAwGIcSlaCsuXOLpr8IzrIZG3S60\n5ztkz2oaihnqovbSMyOc4AglUDVCA7g4kdP0fu5+tI+599GEdynL40adrrsJ\nLwYgwh0S6yYyQhMoXMW6NzNBvIjxHlY8Nf5qaCTzXWulMOhxKPOqw++S78KM\nUmVr7k240TM0oJKMx2+IiEYli+ssRyONOeidYBBtCI0t863mnG7ef65YLmcj\n9JIYREDfUf6BLr4+jJ59+rTaAdQkvZS11FWnP20fa3xOHBoH3J/jI8prDyWV\nPtr3smfzJTsLrp4/8fiznaFqHHiZhah9NQ1KcFKgkTVlniaL9sbkClzQXWiv\n2oF33IWG1iBVVeGq4uam35Xlua+k+brMCkALJvupytuuqe+wKqoZTXTXhBKJ\ntzieEqV+ICtMVvpVeCJtcYUe4h0QPlroW62BgveSLPE+a04ixX3sEePLnrPl\nFGu7\r\n=0nU+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/arr-swap.umd.js","github":{"user":"bemoje"},"module":"dist/arr-swap.esm.js","browser":"dist/arr-swap.umd.js","gitHead":"76b8c9e5243aa71f0c97b085f39e1091a9e0bb6c","scripts":{"docs":"documentation build src/** -f md -o docs/api.md && documentation build src/** -f html -o docs","repo":"node -r esm scripts/repo.js","test":"jest","bench":"node -r esm benchmark/arr-swap.benchmark.js","build":"npm run test && npm run bench && npm run rollup && npm run docs && npm run description && npm run keywords && npm run readme","clean":"rimraf","major":"npm run repo bumpVersionMajor","minor":"npm run repo bumpVersionMinor","patch":"npm run repo bumpVersionPatch","commit":"npm run repo gitCommit","readme":"npm run repo writeReadme","rename":"npm run repo rename","rollup":"rollup -c","example":"node -r esm examples/arr-swap.example.js","publish":"npm run repo npmPublish","version":"npm run repo version","keywords":"npm run repo keywords","git-create":"rimraf .git && npm run repo gitCreate","git-delete":"rimraf .git && bash scripts/github-delete.sh bemoje bemoje-arr-swap","description":"npm run repo description"},"_npmUser":{"name":"bemoje","email":"bemoje@gmail.com"},"repository":{"url":"git+https://github.com/bemoje/bemoje-arr-swap.git","type":"git"},"_npmVersion":"6.12.1","description":"Swap array elements in place. Runtime: O(1)","directories":{},"_nodeVersion":"12.13.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","jest":"^24.9.0","path":"^0.12.7","rimraf":"^3.0.2","rollup":"^1.32.1","fs-extra":"^9.0.0","hirestime":"^6.0.1","walk-sync":"^2.1.0","babel-core":"^6.26.3","babel-jest":"^25.5.1","documentation":"^12.3.0","babel-preset-env":"^1.7.0","keyword-extractor":"0.0.18","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0"},"_npmOperationalInternal":{"tmp":"tmp/arr-swap_1.0.2_1588249094525_0.044584170001649825","host":"s3://npm-registry-packages"},"deprecated":"Package is not maintained."}},"time":{"created":"2020-04-26T01:04:56.890Z","modified":"2025-06-17T23:56:01.758Z","1.0.0":"2020-04-26T01:04:57.112Z","1.0.1":"2020-04-26T01:06:28.702Z","1.0.2":"2020-04-30T12:18:14.688Z"},"bugs":{"url":"https://github.com/bemoje/bemoje-arr-swap/issues","email":"bemoje@gmail.com"},"author":{"url":"https://github.io/bemoje/","name":"Benjamin M. Jensen","email":"bemoje@gmail.com"},"license":"MIT","homepage":"https://github.com/bemoje/bemoje-arr-swap#readme","keywords":["swap","array","elements","place","runtime","o1","arr","modified","index","element","2nd","arrswap"],"repository":{"url":"git+https://github.com/bemoje/bemoje-arr-swap.git","type":"git"},"description":"Swap array elements in place. Runtime: O(1)","maintainers":[{"name":"bemoje","email":"bemoje@gmail.com"}],"readme":"# @bemoje/arr-swap\n\nSwap array elements in place. Runtime: O(1)\n\n#### Version\n\n<span><a href=\"https://npmjs.org/@bemoje/arr-swap\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/@bemoje/arr-swap\" alt=\"NPM version\" /></a></span>\n\n#### Travis CI\n\n<span><a href=\"https://npmjs.org/@bemoje/arr-swap\" title=\"View this project on NPM\"><img src=\"https://travis-ci.org/bemoje/bemoje-arr-swap.svg?branch=master\" alt=\"dependencies\" /></a></span>\n\n#### Dependencies\n\n<span><a href=\"https://npmjs.org/@bemoje/arr-swap\" title=\"View this project on NPM\"><img src=\"https://david-dm.org/bemoje/bemoje-arr-swap.svg\" alt=\"dependencies\" /></a></span>\n\n#### Stats\n\n<span><a href=\"https://npmjs.org/@bemoje/arr-swap\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dt/@bemoje/arr-swap\" alt=\"NPM downloads\" /></a></span>\n<span><a href=\"https://github.com/bemoje/bemoje-arr-swap/fork\" title=\"Fork this project\"><img src=\"https://img.shields.io/github/forks/bemoje/bemoje-arr-swap\" alt=\"Forks\" /></a></span>\n\n#### Donate\n\n<span><a href=\"https://www.buymeacoffee.com/bemoje\" title=\"Donate to this project using Buy Me A Beer\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg?label=Buy me a beer!\" alt=\"Buy Me A Beer donate button\" /></a></span>\n<span><a href=\"https://paypal.me/forstaaloen\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg?label=PayPal\" alt=\"PayPal donate button\" /></a></span>\n\n## Installation\n\n```sh\nnpm install @bemoje/arr-swap\nnpm install --save @bemoje/arr-swap\nnpm install --save-dev @bemoje/arr-swap\n```\n\n## Usage\n\n```javascript\nimport arrSwap from '@bemoje/arr-swap'\n\nconst arr = [10, 20]\n\narrSwap(arr, 0, 1)\n\nconsole.log(arr)\n//=> [20, 10]\n\n```\n\n\n## Tests\nUses *Jest* to test module functionality. Run tests to get coverage details.\n\n```bash\nnpm run test\n```\n\n## API\n### arrSwap\n\nSwap array elements in place. Runtime: O(1)\n\n##### Parameters\n\n-   `arr` **[array][3]** to be modified\n\n-   `from` **[number][4]** index of the first element\n\n-   `to` **[number][4]** index of the 2nd element\n\n##### Returns\n**void** \n\n[1]: #arrswap\n\n[2]: #parameters\n\n[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array\n\n[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number","readmeFilename":"readme.md"}