
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@math-x-ts/generix
Advanced tools
This library tasks is to generate combinations and permutations
Derived from the concepts of 'Generation' and 'Generator', the 'Generix' library is dedicated to the task of data generation based on provided inputs. For example you can use this library to generate combinations & permutations.
Note Generix was primarily designed for educational purposes, and as such, you may encounter certain limitations, such as memory issues. Other languages, like C or C++, might be more suitable for tasks of this nature due to their lower-level system access and more efficient memory management.
npm install --save @math-x-ts/generix
or
yarn add @math-x-ts/generix
import { Combination, Permutation } from '@math-x-ts/generix';
const result = Combination.withoutRepetition(['A', 'B', 'C']);
console.log(result);
[
['A', 'B', 'C']
]
const result = Combination.withoutRepetition(['A', 'B', 'C'], 1);
console.log(result);
[
['A'],
['B'],
['C'],
]
const result = Combination.withoutRepetition(['A', 'B', 'C'], 2);
console.log(result);
[
['A', 'B'],
['A', 'C'],
['B', 'C'],
]
const result = Combination.withoutRepetition(['A', 'B', 'C', 'D'], 2, 3);
console.log(result);
[
['A', 'B'],
['A', 'C'],
['A', 'D'],
['B', 'C'],
['B', 'D'],
['C', 'D'],
['A', 'B', 'C'],
['A', 'B', 'D'],
['A', 'C', 'D'],
['B', 'C', 'D'],
]
const result = Combination.withRepetition(['A', 'B', 'C']);
console.log(result);
[
['A', 'A', 'A'],
['A', 'A', 'B'],
['A', 'A', 'C'],
['A', 'B', 'B'],
['A', 'B', 'C'],
['A', 'C', 'C'],
['B', 'B', 'B'],
['B', 'B', 'C'],
['B', 'C', 'C'],
['C', 'C', 'C']
]
const result = Combination.withRepetition(['A', 'B', 'C'], 1);
console.log(result);
[
['A'],
['B'],
['C'],
]
const result = Combination.withRepetition(['A', 'B', 'C'], 2);
console.log(result);
[
['A', 'A'],
['A', 'B'],
['A', 'C'],
['B', 'B'],
['B', 'C'],
['C', 'C'],
]
const result = Combination.withRepetition(['A', 'B', 'C'], 2, 4);
console.log(result);
[
['A', 'A'],
['A', 'B'],
['A', 'C'],
['B', 'B'],
['B', 'C'],
['C', 'C'],
['A', 'A', 'A'],
['A', 'A', 'B'],
['A', 'A', 'C'],
['A', 'B', 'B'],
['A', 'B', 'C'],
['A', 'C', 'C'],
['B', 'B', 'B'],
['B', 'B', 'C'],
['B', 'C', 'C'],
['C', 'C', 'C'],
['A','A','A','A'],
['A','A','A','B'],
['A','A','A','C'],
['A','A','B','B'],
['A','A','B','C'],
['A','A','C','C'],
['A','B','B','B'],
['A','B','B','C'],
['A','B','C','C'],
['A','C','C','C'],
['B','B','B','B'],
['B','B','B','C'],
['B','B','C','C'],
['B','C','C','C'],
['C','C','C','C']
]
const result = Permutation.withoutRepetition(['A', 'B', 'C']);
console.log(result);
[
['A','B','C'],
['A','C','B'],
['B','A','C'],
['B','C','A'],
['C','A','B'],
['C','B','A']
]
const result = Permutation.withoutRepetition(['A', 'B', 'C'], 2);
console.log(result);
[
['A','B'],
['A','C'],
['B','A'],
['B','C'],
['C','A'],
['C','B']
]
const result = Permutation.withoutRepetition(['a', 'b', 'c'], 2, 3);
console.log(result);
[
['a','b'],
['a','c'],
['b','a'],
['b','c'],
['c','a'],
['c','b'],
['a','b','c'],
['a','c','b'],
['b','a','c'],
['b','c','a'],
['c','a','b'],
['c','b','a']
]
const result = Permutation.withRepetition(['A', 'B']);
console.log(result);
[
['A','A'],
['A','B'],
['B','A'],
['B','B']
]
const result = Permutation.withRepetition(['A', 'B', 'C'], 2);
console.log(result);
[
['A','A'],
['A','B'],
['A','C'],
['B','A'],
['B','B'],
['B','C'],
['C','A'],
['C','B'],
['C','C']
]
const result = Permutation.withRepetition(['A', 'B'], 2, 3);
console.log(result);
[
['A','A'],
['A','B'],
['B','A'],
['B','B'],
['A','A','A'],
['A','A','B'],
['A','B','A'],
['A','B','B'],
['B','A','A'],
['B','A','B'],
['B','B','A'],
['B','B','B']
]
0.0.12 (2023-05-13)
FAQs
This library tasks is to generate combinations and permutations
The npm package @math-x-ts/generix receives a total of 2 weekly downloads. As such, @math-x-ts/generix popularity was classified as not popular.
We found that @math-x-ts/generix 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.