Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-xcf

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-xcf

Check if a buffer/Uint8Array is an XCF image

  • 0.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

is-xcf Build Status

Check if a Buffer/Uint8Array is an XCF image

Inspired by sindresorhus and his wonderful repos like is-gif.

Install

npm install --save is-xcf
bower install --save is-xcf

Usage

Node.js
var fs = require('fs');
var isXCF = require('is-xcf');
var buffer = fs.readFileSync('awesome.xcf');

isXCF(buffer); // returns true
Browser
var xhr = new XMLHttpRequest();
xhr.open('GET', 'awesome.xcf');
xhr.responseType = 'arraybuffer';

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

xhr.send();

API

isXCF(buffer)

Accepts a Buffer or Unit8Array.

Only needs the first 8 bytes, more is fine though.

License

This module is ISC licensed.

Keywords

FAQs

Package last updated on 03 Aug 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc