JSPM

is-eot

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3869
  • Score
    100M100P100Q149370F
  • License MIT

Check if a Buffer/Uint8Array is EOT

Package Exports

  • is-eot

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-eot) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

is-eot Build Status

Check if a Buffer/Uint8Array is a EOT

Install

$ npm install --save is-eot

Usage

Node.js
var readChunk = require('read-chunk'); // npm install read-chunk
var isEot = require('is-eot');
var buffer = readChunk.sync('font.eot', 0, 36);

isEot(buffer);
//=> true
Browser
var xhr = new XMLHttpRequest();
xhr.open('GET', 'font.eot');
xhr.responseType = 'arraybuffer';

xhr.onload = function () {
    isEot(new Uint8Array(this.response));
    //=> true
};

xhr.send();

API

isEot(buffer)

Accepts a Buffer (Node.js) or Uint8Array.

Test

$ npm test

test file from Font-Awesome

License

MIT © junmer