Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 1.05 KB

README.md

File metadata and controls

32 lines (20 loc) · 1.05 KB

@cloudpss/mmap

check Codacy coverage Codacy Badge npm version

This is a pure esm package contains the mmap n-api addon for node.js.

Installation

npm install @cloudpss/mmap

Usage

import { mmap } from '@cloudpss/mmap';

const buffer = mmap('/file/to/mmap');

API

mmap(file: string, length?: number): Buffer

mmap<T>(view: new (buffer: ArrayBufferLike) => T, path: string, length?: number): T

License

MIT