@hugoalh/setation

An ECMAScript (JavaScript & TypeScript) module to list permutations or combinations from the collection or set.

https://github.com/hugoalh/setation-es

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.9%) to scientific vocabulary

Keywords

combination ecmascript ecmascript-module es es-module esm esmodule javascript js permutation set setation ts typescript
Last synced: 4 months ago · JSON representation ·

Repository

An ECMAScript (JavaScript & TypeScript) module to list permutations or combinations from the collection or set.

Basic Info
  • Host: GitHub
  • Owner: hugoalh
  • License: other
  • Language: TypeScript
  • Default Branch: main
  • Homepage:
  • Size: 292 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 1
  • Releases: 4
Topics
combination ecmascript ecmascript-module es es-module esm esmodule javascript js permutation set setation ts typescript
Created almost 3 years ago · Last pushed 5 months ago
Metadata Files
Readme Contributing License Citation Codeowners Security

README.md

Setation (ES)

⚖️ MIT

GitHub: hugoalh/setation-es JSR: @hugoalh/setation NPM: @hugoalh/setation

An ECMAScript (JavaScript & TypeScript) module to list permutations or combinations from the collection or set.

🔰 Begin

🎯 Targets

| Targets | Remote | JSR | NPM | |:--|:-:|:-:|:-:| | Bun >= v1.1.0 | ❌ | ✔️ | ✔️ | | Deno >= v2.1.0 | ✔️ | ✔️ | ✔️ | | NodeJS >= v20.9.0 | ❌ | ✔️ | ✔️ |

[!NOTE] - It is possible to use this module in other methods/ways which not listed in here, however those methods/ways are not officially supported, and should beware maybe cause security issues.

#️⃣ Resources Identifier

  • Remote - GitHub Raw: https://raw.githubusercontent.com/hugoalh/setation-es/{Tag}/mod.ts
  • JSR: [jsr:]@hugoalh/setation[@{Tag}]
  • NPM: [npm:]@hugoalh/setation[@{Tag}]

[!NOTE] - For usage of remote resources, it is recommended to import the entire module with the main path mod.ts, however it is also able to import part of the module with sub path if available, but do not import if:

  • it's path has an underscore prefix (e.g.: _foo.ts, _util/bar.ts), or
  • it is a benchmark or test file (e.g.: foo.bench.ts, foo.test.ts), or
  • it's symbol has an underscore prefix (e.g.: _bar, _foo).

These elements are not considered part of the public API, thus no stability is guaranteed for them. - For usage of JSR or NPM resources, it is recommended to import the entire module with the main entrypoint, however it is also able to import part of the module with sub entrypoint if available, please visit the file jsr.jsonc property exports for available sub entrypoints. - It is recommended to use this module with tag for immutability.

🛡️ Runtime Permissions

This module does not request any runtime permission.

🧩 APIs

  • ts function combinationCollection<K, V>(item: Map<K, readonly V[]>): Generator<Map<K, V>>; function combinationCollection<K extends string, V>(item: Record<K, readonly V[]>): Generator<Record<K, V>>;
  • ts function combinationSet<T>(set: readonly T[] | Set<T>, size: number | readonly number[] | SetationSetSizeRange, options?: SetationSetOptions): Generator<T[]>;
  • ts function permutationSet<T>(set: readonly T[] | Set<T>, size: number | readonly number[] | SetationSetSizeRange, options?: SetationSetOptions): Generator<T[]>;

[!NOTE] - For the full or prettier documentation, can visit via: - Deno CLI deno doc - JSR

✍️ Examples

  • ```js const item = ["a", "b", "c", "d", "e", "f"];

Array.from(combinationSet(item, 3)); //=> // [ // [ "a", "b", "c" ], [ "a", "b", "d" ], // [ "a", "b", "e" ], [ "a", "b", "f" ], // [ "a", "c", "d" ], [ "a", "c", "e" ], // [ "a", "c", "f" ], [ "a", "d", "e" ], // [ "a", "d", "f" ], [ "a", "e", "f" ], // [ "b", "c", "d" ], [ "b", "c", "e" ], // [ "b", "c", "f" ], [ "b", "d", "e" ], // [ "b", "d", "f" ], [ "b", "e", "f" ], // [ "c", "d", "e" ], [ "c", "d", "f" ], // [ "c", "e", "f" ], [ "d", "e", "f" ] // ]

Array.from(permutationSet(item, 3)); //=> // [ // [ "a", "b", "c" ], [ "a", "b", "d" ], // [ "a", "b", "e" ], [ "a", "b", "f" ], // [ "a", "c", "b" ], [ "a", "c", "d" ], // [ "a", "c", "e" ], [ "a", "c", "f" ], // [ "a", "d", "b" ], [ "a", "d", "c" ], // [ "a", "d", "e" ], [ "a", "d", "f" ], // [ "a", "e", "b" ], [ "a", "e", "c" ], // [ "a", "e", "d" ], [ "a", "e", "f" ], // [ "a", "f", "b" ], [ "a", "f", "c" ], // [ "a", "f", "d" ], [ "a", "f", "e" ], // [ "b", "a", "c" ], [ "b", "a", "d" ], // [ "b", "a", "e" ], [ "b", "a", "f" ], // [ "b", "c", "a" ], [ "b", "c", "d" ], // [ "b", "c", "e" ], [ "b", "c", "f" ], // [ "b", "d", "a" ], [ "b", "d", "c" ], // [ "b", "d", "e" ], [ "b", "d", "f" ], // [ "b", "e", "a" ], [ "b", "e", "c" ], // [ "b", "e", "d" ], [ "b", "e", "f" ], // [ "b", "f", "a" ], [ "b", "f", "c" ], // [ "b", "f", "d" ], [ "b", "f", "e" ], // ... +80 // ] -js Array.from(combinationCollection({ foo: [1, 2, 3], bar: [4, 5, 6] })); //=> // [ // { foo: 1, bar: 4 }, { foo: 1, bar: 5 }, // { foo: 1, bar: 6 }, { foo: 2, bar: 4 }, // { foo: 2, bar: 5 }, { foo: 2, bar: 6 }, // { foo: 3, bar: 4 }, { foo: 3, bar: 5 }, // { foo: 3, bar: 6 } // ] ```

Owner

  • Name: hugoalh
  • Login: hugoalh
  • Kind: user
  • Location: Everywhere
  • Company: @hugoalh-studio

Lead of @hugoalh-studio; Full time software developer; Part time freelancer

Citation (CITATION.cff)

# yaml-language-server: $schema=https://citation-file-format.github.io/1.2.0/schema.json
cff-version: "1.2.0"
title: "Setation (ES)"
message: "If you use this software, please cite it using the metadata from this file."
type: "software"
authors:
  - name: "hugoalh"
repository-code: "https://github.com/hugoalh/setation-es"
keywords:
  - "combination"
  - "ecmascript"
  - "ecmascript-module"
  - "es"
  - "es-module"
  - "esm"
  - "esmodule"
  - "javascript"
  - "js"
  - "permutation"
  - "set"
  - "setation"
  - "ts"
  - "typescript"
license: "MIT"

GitHub Events

Total
  • Create event: 3
  • Release event: 1
  • Issues event: 1
  • Delete event: 3
  • Issue comment event: 2
  • Push event: 9
  • Pull request event: 5
Last Year
  • Create event: 3
  • Release event: 1
  • Issues event: 1
  • Delete event: 3
  • Issue comment event: 2
  • Push event: 9
  • Pull request event: 5

Issues and Pull Requests

Last synced: 5 months ago

All Time
  • Total issues: 1
  • Total pull requests: 153
  • Average time to close issues: 7 months
  • Average time to close pull requests: 4 days
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.99
  • Merged pull requests: 5
  • Bot issues: 0
  • Bot pull requests: 153
Past Year
  • Issues: 0
  • Pull requests: 4
  • Average time to close issues: N/A
  • Average time to close pull requests: 24 days
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 1.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 4
Top Authors
Issue Authors
Pull Request Authors
  • dependabot[bot] (143)
Top Labels
Issue Labels
Pull Request Labels
Type/Dependency 📦 (142) Status/Pending 🔵 (136) Platform/NodeJS (135) Platform/GitHubActions (7) Priority/Low 🟢 (6) github-actions (1) dependency 📦 (1)

Packages

  • Total packages: 1
  • Total downloads:
    • npm 73 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 5
  • Total maintainers: 1
npmjs.org: @hugoalh/setation

A module to list permutations or combinations from the collection or set.

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 73 Last month
Rankings
Forks count: 15.9%
Stargazers count: 17.3%
Average: 31.2%
Downloads: 31.4%
Dependent repos count: 37.5%
Dependent packages count: 54.0%
Maintainers (1)
Last synced: 5 months ago