Socket
Socket
Sign inDemoInstall

checkerboardjs

Package Overview
Dependencies
0
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    checkerboardjs

Easily draw transparency pattern on canvas when flattenning images


Version published
Weekly downloads
3
decreased by-78.57%
Maintainers
1
Created
Weekly downloads
 

Readme

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

Last updated on 11 Oct 2021

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc