deno-infer

1.0.8 • Public • Published

Infer (deno-wasm)

Deno wasm bindings to https://github.com/bojand/infer

https://www.npmjs.com/package/deno-infer

Should work with node as well

Usage

import * as infer from "npm:deno-infer";

const file = Deno.readFileSync("filePath");
const type = infer.get(file);
// or this convinient method that reads only the start of the file
// const type = infer.getFromPath(file); // requires Deno 1.37.3 if used from npm
console.log(type.extension());
console.log(type.matcherType());
console.log(type.mimeType());

Readme

Keywords

none

Package Sidebar

Install

npm i deno-infer

Weekly Downloads

0

Version

1.0.8

License

MIT

Unpacked Size

119 kB

Total Files

17

Last publish

Collaborators

  • sigmasd