bytes-matcher-es
An ECMAScript (JavaScript & TypeScript) module to determine whether the bytes is match the specify signature.
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.4%) to scientific vocabulary
Keywords
Repository
An ECMAScript (JavaScript & TypeScript) module to determine whether the bytes is match the specify signature.
Basic Info
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 2
Topics
Metadata Files
README.md
Bytes Matcher (ES)
An ECMAScript (JavaScript & TypeScript) module for bytes match.
🔰 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/bytes-matcher-es/{Tag}/mod.ts - JSR:
[jsr:]@hugoalh/bytes-matcher[@{Tag}] - NPM:
[npm:]@hugoalh/bytes-matcher[@{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.jsoncpropertyexportsfor 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 class BytesMatcher { constructor(signature: BytesMatcherSignature<string | Uint8Array>[]): this; test(item: string | Uint8Array): boolean; testFile(file: string | URL | Deno.FsFile): Promise<boolean>; get weight(): number; }ts class MagicBytesMatcher { constructor(filter?: (meta: MagicBytesMeta) => boolean): this; match(item: string | Uint8Array): MagicBytesMetaExtend | null; matchAll(item: string | Uint8Array): Generator<MagicBytesMetaExtend>; matchFile(file: string | URL | Deno.FsFile): Promise<MagicBytesMetaExtend | null>; matchFileAll(file: string | URL | Deno.FsFile): AsyncGenerator<MagicBytesMetaExtend>; test(item: string | Uint8Array): boolean; testFile(file: string | URL | Deno.FsFile): Promise<boolean>; }ts interface BytesMatcherSignature<T extends string | Uint8Array> { offset: number; pattern: T; }ts interface MagicBytesMeta { category: MagicBytesMetaCategory; extensions: `.${string}`[]; mimes: string[]; name: string; variant?: string; }ts interface MagicBytesMetaExtend extends MagicBytesMeta { weight: number; }ts type MagicBytesMetaCategory = "archive" | "audio" | "compressed" | "database" | "diagram" | "disk" | "document" | "ebook" | "executable" | "font" | "formula" | "geospatial" | "image" | "metadata" | "model" | "other" | "package" | "playlist" | "presentation" | "rom" | "spreadsheet" | "subtitle" | "video";
[!NOTE] - For the full or prettier documentation, can visit via: - Deno CLI
deno doc- JSR
Owner
- Name: hugoalh
- Login: hugoalh
- Kind: user
- Location: Everywhere
- Company: @hugoalh-studio
- Twitter: hugoalhofficial
- Repositories: 12
- Profile: https://github.com/hugoalh
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: "Bytes Matcher (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/bytes-matcher-es" keywords: - "bytes" - "ecmascript" - "ecmascript-module" - "es" - "es-module" - "esm" - "esmodule" - "javascript" - "js" - "matcher" - "ts" - "typescript" license: "MIT"
GitHub Events
Total
- Delete event: 8
- Issue comment event: 4
- Push event: 13
- Pull request event: 12
- Pull request review event: 5
- Create event: 5
Last Year
- Delete event: 8
- Issue comment event: 4
- Push event: 13
- Pull request event: 12
- Pull request review event: 5
- Create event: 5
Dependencies
- hugoalh/send-discord-webhook-ghaction v6.0.2 composite