@hugoalh/sort

An ECMAScript (JavaScript & TypeScript) module for enhanced sort operation.

https://github.com/hugoalh/sort-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.1%) to scientific vocabulary

Keywords

ecmascript ecmascript-module es es-module esm esmodule javascript js sort ts typescript
Last synced: 4 months ago · JSON representation ·

Repository

An ECMAScript (JavaScript & TypeScript) module for enhanced sort operation.

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

README.md

Sort (ES)

⚖️ MIT

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

An ECMAScript (JavaScript & TypeScript) module for enhanced sort operation.

🔰 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/sort-es/{Tag}/mod.ts
  • JSR: [jsr:]@hugoalh/sort[@{Tag}]
  • NPM: [npm:]@hugoalh/sort[@{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 sortCollection<K, V>(collection: Map<K, V>, selector: SortCollectionSelector<K, V>, options?: SortCollectionOptions<K>): Map<K, V>; function sortCollection<K extends string, V>(collection: Record<K, V>, selector: SortCollectionSelector<K, V>, options?: SortCollectionOptions<K>): Record<K, V>;
  • ts function sortCollectionByKeys<K extends SortableType, V>(collection: Map<K, V>, options?: SortCollectionOptions<K>): Map<K, V>; function sortCollectionByKeys<K extends string, V>(collection: Record<K, V>, options?: SortCollectionOptions<K>): Record<K, V>;
  • ts function sortCollectionByValues<K, V extends SortableType>(collection: Map<K, V>, options?: SortCollectionOptions<K>): Map<K, V>; function sortCollectionByValues<K extends string, V extends SortableType>(collection: Record<K, V>, options?: SortCollectionOptions<K>): Record<K, V>;
  • ts function sortElements<T extends SortableType>(elements: readonly T[] | Iterable<T>, options?: SortElementsOptions<T>): T[]; function sortElements<T extends SortableType>(elements: Set<T>, options?: SortElementsOptions<T>): Set<T>; function sortElements<T>(elements: readonly T[] | Iterable<T>, selector: SortElementsSelector<T>, options?: SortElementsOptions<T>): T[]; function sortElements<T>(elements: Set<T>, selector: SortElementsSelector<T>, options?: SortElementsOptions<T>): Set<T>;
  • ts type SortableType = | bigint | number | string | Date;

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

✍️ Examples

  • ts sortElements([1.1, 1.2, 1n, 0]); //=> [0, 1n, 1.1, 1.2]
  • ts sortElements(["sample10.png", "sample3.png", "sample2.png", "sample5.png", "sample4.png"]); //=> ["sample2.png", "sample3.png", "sample4.png", "sample5.png", "sample10.png"]

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

GitHub Events

Total
  • Create event: 8
  • Release event: 3
  • Issues event: 3
  • Watch event: 1
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 24
  • Pull request event: 2
Last Year
  • Create event: 8
  • Release event: 3
  • Issues event: 3
  • Watch event: 1
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 24
  • Pull request event: 2

Issues and Pull Requests

Last synced: 5 months ago

All Time
  • Total issues: 2
  • Total pull requests: 1
  • Average time to close issues: about 1 month
  • Average time to close pull requests: about 5 hours
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 1
  • Average time to close issues: about 1 month
  • Average time to close pull requests: about 5 hours
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • hugoalh (2)
Pull Request Authors
  • hugoalh (2)
  • dependabot[bot] (1)
Top Labels
Issue Labels
Type/Enhancement 💡 (1) Priority/Medium 🟡 (1) Type/Bug 🐛 (1) Priority/High 🔴 (1)
Pull Request Labels
Priority/High 🔴 (1) 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/sort

A module for enhanced sort operation.

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 73 Last month
Rankings
Dependent repos count: 25.5%
Average: 31.2%
Dependent packages count: 36.9%
Maintainers (1)
Last synced: 5 months ago