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

checkerboardjs

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

checkerboardjs

Easily draw transparency pattern on canvas when flattenning images

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Checkerboard.js

Easily draw transparency pattern on canvas when flattenning images

Dependency-free, 1.7kB gzipped. Idk if it's large it literally has 40 lines unpacked, and 1024 chars in total packed, if u really care about each byte, stop using javascript and canvas bro

Installation

$ npm i checkerboardjs

Usage

drawPattern(canvas<HTMLCanvasElement>, ?options<Object>)

Options

PropertyTypeDefaultDescription
centeredboolfalseDraws pattern from center instead of left top corner
ignoreWarningsboolfalseIgnores any errors and warnings
primaryColorstring#EDEDEDCSS color of even cells
secondaryColorstring#C6C6C6CSS color of odd cells
sizenumber10Size of cell in pixels

Example

import drawPattern from 'checkerboardjs'

const canvas = document.querySelector('canvas')
drawPattern(canvas)

Contributing, license, issues

blah blah blah go find something better to do and don't bother me

Keywords

FAQs

Package last updated on 11 Oct 2021

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