Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

omni-file

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

omni-file - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

30

dist/index.d.ts

@@ -76,6 +76,3 @@ /**

* @example
* {
* "js": "JavaScript",
* "py": "Python"
* }
* { "js": "JavaScript", "py": "Python" }
*/

@@ -87,6 +84,3 @@ type ExtensionMapJSON = Record<string, string>;

* @example
* {
* "makefile": "Makefile",
* "Dockerfile": "Dockerfile"
* }
* { "makefile": "Makefile", "Dockerfile": "Dockerfile" }
*/

@@ -133,3 +127,11 @@ type FileNamesMapJSON = Record<string, string>;

/**
* The default icon set for dark themes.
* This constant contains all the icon definitions for files, folders, and languages.
*/
declare const icons: IconsJSON;
/**
* The icon set for light themes.
* This constant contains all the icon definitions for files, folders, and languages optimized for light backgrounds.
*/
declare const iconsLight: IconsJSON;

@@ -166,4 +168,16 @@ /**

/**
* A collection of language data, including icons, indexed by language name.
* This constant contains detailed information about various programming languages.
*/
declare const languages: LanguagesWithIconsJSON;
/**
* A mapping of file extensions to language names.
* This constant is used to determine the language of a file based on its extension.
*/
declare const extensionMap: ExtensionMapJSON;
/**
* A mapping of specific filenames to language names.
* This constant is used to determine the language of a file based on its exact filename.
*/
declare const fileNamesMap: FileNamesMapJSON;

@@ -170,0 +184,0 @@ /**

{
"name": "omni-file",
"version": "1.3.1",
"version": "1.3.2",
"description": "You got a filename/foldername we got all its info: icon, category, type, extensions, mime type, color, and more...",

@@ -60,2 +60,4 @@ "homepage": "https://codyadam.github.io/omni-file/",

"tsx": "^4.19.1",
"typedoc": "^0.26.8",
"typedoc-material-theme": "^1.1.0",
"typescript": "^5.6.2",

@@ -68,4 +70,5 @@ "vitest": "^2.1.2"

"test:coverage": "vitest run --coverage",
"update-data": "tsx scripts/run-all.ts"
"update-data": "tsx scripts/run-all.ts",
"docs": "typedoc"
}
}

@@ -6,3 +6,5 @@ # omni-file

[![License](https://img.shields.io/github/license/CodyAdam/omni-file.svg)](https://github.com/CodyAdam/omni-file/blob/main/LICENSE)
[![Documentation](https://img.shields.io/badge/docs-online-blue.svg)](https://codyadam.github.io/omni-file/docs/index.html)
Omni-file is a comprehensive file information extractor that provides language, icon, type, and MIME information for any file based on its name or extension. With **over 1000 icons**, support for **more than 700 programming languages**, and only **79.4 kB gzipped**, it's both **powerful and lightweight**!

@@ -132,32 +134,4 @@

**Core functions:**
[Documentation](https://codyadam.github.io/omni-file/docs/index.html)
- `getLanguage(filename: string): Language`
- `getIcon(filename: string, options?: IconOptions): string`
**Utility functions:**
- `getBaseFilenameFromRelativePath(filePath: string): string`
- `getExtensionsFromRelativePath(filePath: string): string[]`
**Type definitions:**
- `LanguageData`: Detailed information about a programming language
- `LanguageWithIconsData`: Extends `LanguageData` with icon information
- `IconOptions`: Options for icon retrieval (isFolder, isExpanded, isLight)
- `LanguagesJSON`: A record of language names to `LanguageData` objects
- `LanguagesWithIconsJSON`: A record of language names to `LanguageWithIconsData` objects
- `ExtensionMapJSON`: Maps file extensions to language names
- `FileNamesMapJSON`: Maps specific filenames to language names
- `IconsJSON`: Defines icon associations for files and folders
**Raw data:**
- [`languages`](https://github.com/CodyAdam/omni-file/tree/main/src/data/languages-with-icons.json): A map of all languages with icons
- [`extensionMap`](https://github.com/CodyAdam/omni-file/tree/main/src/data/extension-map.json): Maps file extensions to language names
- [`fileNamesMap`](https://github.com/CodyAdam/omni-file/tree/main/src/data/file-names-map.json): Maps specific filenames to language names
- [`icons`](https://github.com/CodyAdam/omni-file/tree/main/src/data/icons.json): Default icon set (dark theme)
- [`iconsLight`](https://github.com/CodyAdam/omni-file/tree/main/src/data/icons-light.json): Light theme icon set (has less icons then dark theme)
## Icon Themes

@@ -164,0 +138,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc