@hugoalh/shuffle-array

An ECMAScript (JavaScript & TypeScript) module to shuffle the array's indexes.

https://github.com/hugoalh/shuffle-array-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
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.5%) to scientific vocabulary

Keywords

array ecmascript ecmascript-module es es-module esm esmodule javascript js shuffle ts typescript

Keywords from Contributors

interactive optim mesh interpretability profiles sequences generic projection embedded hacking
Last synced: 4 months ago · JSON representation ·

Repository

An ECMAScript (JavaScript & TypeScript) module to shuffle the array's indexes.

Basic Info
  • Host: GitHub
  • Owner: hugoalh
  • License: other
  • Language: TypeScript
  • Default Branch: main
  • Homepage:
  • Size: 213 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 1
  • Releases: 16
Topics
array ecmascript ecmascript-module es es-module esm esmodule javascript js shuffle ts typescript
Created over 2 years ago · Last pushed 5 months ago
Metadata Files
Readme Contributing License Citation Codeowners Security

README.md

Shuffle Array (ES)

⚖️ MIT

GitHub: hugoalh/shuffle-array-es JSR: @hugoalh/shuffle-array NPM: @hugoalh/shuffle-array

An ECMAScript (JavaScript & TypeScript) module to shuffle the array's indexes.

🔰 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/shuffle-array-es/{Tag}/mod.ts
  • JSR: [jsr:]@hugoalh/shuffle-array[@{Tag}]
  • NPM: [npm:]@hugoalh/shuffle-array[@{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 shuffleArray<T>(item: readonly T[], prng?: PseudoRandomNumberGenerator): T[];
  • ts type PseudoRandomNumberGenerator = () => number;

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

✍️ Examples

  • ```ts const item = [3, 7, 25, 26, 42, 62, 71, 76, 92, 93];

shuffleArray(item); //=> [62, 93, 26, 42, 25, 7, 76, 71, 3, 92]

shuffleArray(item); //=> [42, 3, 26, 62, 93, 7, 76, 25, 92, 71] ```

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: "Shuffle Array (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/shuffle-array-es"
keywords:
  - "array"
  - "ecmascript"
  - "ecmascript-module"
  - "es"
  - "es-module"
  - "esm"
  - "esmodule"
  - "javascript"
  - "js"
  - "shuffle"
  - "ts"
  - "typescript"
license: "MIT"

GitHub Events

Total
  • Create event: 6
  • Issues event: 2
  • Release event: 3
  • Delete event: 4
  • Issue comment event: 1
  • Push event: 22
  • Pull request review event: 2
  • Pull request event: 7
Last Year
  • Create event: 6
  • Issues event: 2
  • Release event: 3
  • Delete event: 4
  • Issue comment event: 1
  • Push event: 22
  • Pull request review event: 2
  • Pull request event: 7

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 190
  • Total Committers: 2
  • Avg Commits per committer: 95.0
  • Development Distribution Score (DDS): 0.047
Past Year
  • Commits: 43
  • Committers: 2
  • Avg Commits per committer: 21.5
  • Development Distribution Score (DDS): 0.209
Top Committers
Name Email Commits
hugoalh 3****h 181
dependabot[bot] 4****] 9

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 1
  • Total pull requests: 26
  • Average time to close issues: 4 months
  • Average time to close pull requests: 9 days
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.77
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 26
Past Year
  • Issues: 1
  • Pull requests: 12
  • Average time to close issues: 4 months
  • Average time to close pull requests: 8 days
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.75
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 12
Top Authors
Issue Authors
  • hugoalh (1)
Pull Request Authors
  • dependabot[bot] (31)
Top Labels
Issue Labels
Priority/Low 🟢 (1) Type/Documentation 📓 (1) Platform/DenoNetwork (1)
Pull Request Labels
Type/Dependency 📦 (31) Platform/NodeJS (18) Status/Pending 🔵 (16) Platform/GitHubActions (13) Priority/Low 🟢 (12) Status/Duplicated 🔁 (2)

Packages

  • Total packages: 1
  • Total downloads:
    • npm 3 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 13
  • Total maintainers: 1
npmjs.org: @hugoalh/shuffle-array

A module to shuffle the array's indexes.

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