file-uti

3.0.1 • Public • Published

file-uti

Get the UTI (Uniform Type Identifier) of a file on macOS

Install

$ npm install file-uti

Usage

import {fileUti} from 'file-uti';

console.log(await fileUti('index.js'));
//=> 'com.netscape.javascript-source'

API

fileUti(filePath)

Returns a Promise<string> with the UTI.

fileUtiSync(filePath)

Returns a string with the UTI.

Related

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.1
    4
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 3.0.1
    4
  • 3.0.0
    2
  • 2.0.0
    0
  • 1.0.0
    1

Package Sidebar

Install

npm i file-uti

Weekly Downloads

7

Version

3.0.1

License

MIT

Unpacked Size

2.94 kB

Total Files

4

Last publish

Collaborators

  • sindresorhus