
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
Please see ars technica article for a description about the principles of UTIs.
For a list of known UTIs please see here
import { UTIController } from "uti";
const uc = new UTIController();
const doesConformTo = uc.conformsTo("public.image", "public.data");
console.log("doesConformTo: " + doesConformTo);
console.log(uc.getUTIsForFileName("a.txt")[0]);
Output
doesConformTo: true
public.plain-text
Type: Object
name string conformsTo (string | Array<string>)? mimeType (string | Array<string>)? fileNameExtension (string | Array<string>)? Object representing a UTI.
Type: string
Check for conformity.
Returns boolean true if other conforms to the receiver
name of the UTI.
Returns string
Deliver JSON representation of the UTI. Sample result
{
"name": "myUTI",
"conformsTo": [ "uti1", "uti2"]
}
Returns {name: string, conforms: Array<string>} json representation of the UTI
Registry of UTIs.
Type: Map<string, Array<string>>
Type: Map<string, Array<string>>
Registers additional types.
types Array<UTIDeclaration> Lookup a given UTI.
name string UTIReturns (UTI | undefined) UTI for the given name or undefined if UTI is not present.
Lookup a UTIs for a mime type.
mimeType string mime type to get UTIs forReturns Array<string> UTIs for the given mime type
Lookup a UTI for a file name. First the file name extension is extracted. Then a lookup in the registered UTIs for file name extension is executed.
fileName string file to detect UTI forReturns Array<string> UTIs for the given fileName
Check whenever two UTI are conformant. If a conforms to b and b conforms to c then a also conforms to c.
Returns boolean true if UTI a conforms to UTI b.
Lookup a UTI for a file name and check conformance.
Returns boolean true if utils for file name are conformant
Assign mime types to a UTI
Assign mime types to a UTI
With npm do:
npm install uti
BSD-2-Clause
FAQs
javascript implementation of a "Uniform Type Identifier" (UTI)
The npm package uti receives a total of 1,302 weekly downloads. As such, uti popularity was classified as popular.
We found that uti demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.