# is-canvas-context

> varify variabe is a canvas context

Latest version **1.0.0** (published 2015-08-14) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install is-canvas-context
pnpm add is-canvas-context
yarn add is-canvas-context
bun add is-canvas-context
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-08-14 |
| First published | 2015-08-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Will Hoag |
| Maintainers | willhoag |
| Keywords | canvas, sanity, check, convert, html5 |

## Links

- npm: https://www.npmjs.com/package/is-canvas-context
- Repository: https://github.com/willhoag/is-canvas-context
- Homepage: git://github.com/willhoag/is-canvas-context.git
- Issues: https://github.com/willhoag/is-canvas-context/issues
- npm.io page: https://npm.io/package/is-canvas-context

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-08-14
- 0.0.2 — 2015-08-09
- 0.0.1 — 2015-08-08
- 0.0.0 — 2015-08-08

## README

# is-canvas-context

varify a variable is a canvas context

[![Build Status](https://travis-ci.org/willhoag/is-canvas-context.svg)](https://travis-ci.org/willhoag/is-canvas-context)
[![npm version](https://badge.fury.io/js/is-canvas-context.svg)](http://badge.fury.io/js/is-canvas-context)

## Installation

Download node at [nodejs.org](http://nodejs.org) and install it, if you haven't already.

```sh
npm install is-canvas-context --save
```

## Usage

```js
import isCanvasContext from './'

let canvas = document.createElement('canvas')

isCanvasContext(canvas) // false
isCanvasContext(canvas.getContext('2d')) // true
isCanvasContext('not a context or canvas') // false
```

## API

`isCanvasContext(ctx:any):boolean`

## License

ISC

---
_Source: https://npm.io/package/is-canvas-context · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
