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

invert-permutation

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

invert-permutation

Inverts permutations

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22K
increased by15.9%
Maintainers
1
Weekly downloads
 
Created
Source

invert-permutation

Computes the inverse of a permutation

Example

console.log( require("invert-permutation")([1,3,0,2]) )

//Prints:
//          [ 2, 1, 3, 0 ]

Install

npm install invert-permutation

API

`require("invert-permutation")(perm[, result])

Inverts a permutation

  • perm is the permutation to invert
  • result is an optional array that gets the result of inverting the permutation

Returns result or a newly allocated array if nothing is specified

Credits

(c) 2013 Mikola Lysenko. MIT License

Keywords

FAQs

Package last updated on 30 Apr 2014

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

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