# is-webgl-context

> whether the given object is a WebGL context

Latest version **1.1.0** (published 2015-06-11) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2015-06-11 |
| First published | 2014-10-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Matt DesLauriers |
| Maintainers | mattdesl |
| Keywords | is, webgl, gl, glsl, shader, context, ctx, experimental-webgl |

## Links

- npm: https://www.npmjs.com/package/is-webgl-context
- Repository: https://github.com/mattdesl/is-webgl-context
- Issues: https://github.com/mattdesl/is-webgl-context/issues
- npm.io page: https://npm.io/package/is-webgl-context

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2015-06-11
- 1.0.0 — 2014-10-05

## README

# is-webgl-context

[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)

Test whether the given object is a WebGL or WebGL2 context. This is useful to handle edge-cases, such as when [Chrome WebGL Inspector](https://chrome.google.com/webstore/detail/webgl-inspector/ogkcjmbhnfmlnielkjhedpcjomeaghda?hl=en) wraps WebGLRenderingContext in a different type. 

Runs in Node and the browser.

```js
var isGL = require('is-webgl-context')

isGL(foo)
```

## Usage

[![NPM](https://nodei.co/npm/is-webgl-context.png)](https://nodei.co/npm/is-webgl-context/)

#### `isGLContext(obj)`

Returns true if the object is an instance of WebGL[2]RenderingContext, handling edge cases for WebGL debuggers/inspectors. 

## License

MIT, see [LICENSE.md](http://github.com/mattdesl/is-webgl-context/blob/master/LICENSE.md) for details.

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