{"_id":"2d-context","_rev":"12-ec3e340343a77f4a4eb8b060baa6dd91","name":"2d-context","description":"grabs a new 2d canvas context","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.1":{"name":"2d-context","version":"1.0.1","description":"grabs a new 2d canvas context","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{},"devDependencies":{"browserify":"^8.0.2","faucet":"0.0.1","tape":"^3.0.3","testling":"^1.7.1"},"scripts":{"test":"browserify test.js | testling | faucet"},"keywords":["canvas","context","webgl-context","2d-context","2d","createElement","create","element"],"repository":{"type":"git","url":"git://github.com/mattdesl/2d-context.git"},"homepage":"https://github.com/mattdesl/2d-context","bugs":{"url":"https://github.com/mattdesl/2d-context/issues"},"gitHead":"45c4ad7962097d616651d17d09d5c388985a3dcc","_id":"2d-context@1.0.1","_shasum":"685a10d34ec6911c46728c96778bdea000e4b031","_from":".","_npmVersion":"2.1.4","_nodeVersion":"0.10.32","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"dist":{"shasum":"685a10d34ec6911c46728c96778bdea000e4b031","tarball":"https://registry.npmjs.org/2d-context/-/2d-context-1.0.1.tgz","integrity":"sha512-a8xC4ivacqB2+Sb7NcfZmnEJswcsSbuVc9llPfEalFb9BCY9OAB7R2EsvuFgnSvfnDdMtk/qJ/fx6ZYlKsSihg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7EtJbWokvKWw0TSmGxe0NUYFyPXSZSZ8rC7cM3QmDtQIhALI8z5/IyQ/zlI7G5RLB9bmadOQnO40/0iXH/tmLk37N"}]}},"1.0.2":{"name":"2d-context","version":"1.0.2","description":"grabs a new 2d canvas context","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{},"devDependencies":{"browserify":"^8.0.2","faucet":"0.0.1","tape":"^3.0.3","testling":"^1.7.1"},"scripts":{"test":"browserify test.js | testling | faucet"},"keywords":["canvas","context","webgl-context","2d-context","2d","createElement","create","element"],"repository":{"type":"git","url":"git://github.com/mattdesl/2d-context.git"},"homepage":"https://github.com/mattdesl/2d-context","bugs":{"url":"https://github.com/mattdesl/2d-context/issues"},"gitHead":"1c7851f2f8d6b9a36c5cdbce78a37fd1e0253175","_id":"2d-context@1.0.2","_shasum":"49f414233985ea31b4b04b594c165d10a42cb956","_from":".","_npmVersion":"2.1.4","_nodeVersion":"0.10.32","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"dist":{"shasum":"49f414233985ea31b4b04b594c165d10a42cb956","tarball":"https://registry.npmjs.org/2d-context/-/2d-context-1.0.2.tgz","integrity":"sha512-x4a+GMib1x4r4diBg32bjC/nBXunVa9vNCQyQkJ0XIkmaaXODTEGTZX7C1jhnebRWjJeTzGBcQjZ8T1SqxAmwQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICQfOPWRonjMpRQQhGQeKnQUbt/6/bFZZdKQU7dd3OpDAiEA3zuJXTbBHFMkEFO0347qo2neUq0emsVVLNyJAMCEHJs="}]}},"1.1.0":{"name":"2d-context","version":"1.1.0","description":"grabs a new 2d canvas context","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{},"devDependencies":{"browserify":"^8.0.2","faucet":"0.0.1","tape":"^3.0.3","testling":"^1.7.1"},"scripts":{"test":"browserify test.js | testling | faucet"},"keywords":["canvas","context","webgl-context","2d-context","2d","createElement","create","element"],"repository":{"type":"git","url":"git://github.com/mattdesl/2d-context.git"},"homepage":"https://github.com/mattdesl/2d-context","bugs":{"url":"https://github.com/mattdesl/2d-context/issues"},"gitHead":"bb0b81a57f716ef640026eb0cfff5f19c6951469","_id":"2d-context@1.1.0","_shasum":"7d4f26f0a16800a21b540616fc095a39b0b28e65","_from":".","_npmVersion":"2.1.4","_nodeVersion":"0.10.32","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"dist":{"shasum":"7d4f26f0a16800a21b540616fc095a39b0b28e65","tarball":"https://registry.npmjs.org/2d-context/-/2d-context-1.1.0.tgz","integrity":"sha512-PhgZPPPIKEs0GYEH3jO/PhG7TMmwu7ypnzAzgzKpLqH/V0VY5DU/SZMYgOjxZLHZ11z89OthXoucyeQZSbhA2Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdT6ZaWXfyyqd6faRL6vs8J7QNHbWelBUchv8QnX1ZRAIgA21ix3ASBV6miUH4WV4Q4alYe6mI/bMdyYtkRUpJA2M="}]}},"1.2.0":{"name":"2d-context","version":"1.2.0","description":"grabs a new 2d canvas context","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{},"devDependencies":{"browserify":"^8.0.2","faucet":"0.0.1","tape":"^3.0.3","testling":"^1.7.1"},"scripts":{"test-node":"node test-node.js | faucet","test":"browserify test.js | testling | faucet"},"keywords":["canvas","context","webgl-context","2d-context","2d","createElement","create","element"],"repository":{"type":"git","url":"git://github.com/mattdesl/2d-context.git"},"homepage":"https://github.com/mattdesl/2d-context","bugs":{"url":"https://github.com/mattdesl/2d-context/issues"},"gitHead":"724139a7836a173a027f6d8647e8c685789d3f2b","_id":"2d-context@1.2.0","_shasum":"b4c6b59172dd02d977e93a4855797177f8ec7700","_from":".","_npmVersion":"2.2.0","_nodeVersion":"0.10.35","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"dist":{"shasum":"b4c6b59172dd02d977e93a4855797177f8ec7700","tarball":"https://registry.npmjs.org/2d-context/-/2d-context-1.2.0.tgz","integrity":"sha512-ejS/jWyLtR0IKRGaic65H+nJQuQfgb95xDIebnf+L4ZQZ/ZETBcG+NElID5Fo1ETf2eUHPXVuQsVS+EVulRJmQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAtzP+gdmf3DSH/LhVeRDfF4xOe8s7HFpMFMgW48i79mAiEAlIhjYpLbhzbV2Sw+9JcB2fdsGUlwygtrF4UFbHrLYEM="}]}},"1.3.0":{"name":"2d-context","version":"1.3.0","description":"grabs a new 2d canvas context","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{"get-canvas-context":"^1.0.1"},"devDependencies":{"browserify":"^8.0.2","faucet":"0.0.1","tape":"^3.0.3","testling":"^1.7.1"},"scripts":{"test-node":"node test-node.js | faucet","test-browser":"browserify test.js | testling | faucet","test":"npm run test-browser && npm run test-node"},"keywords":["canvas","context","webgl-context","2d-context","2d","createElement","create","element"],"repository":{"type":"git","url":"git://github.com/mattdesl/2d-context.git"},"homepage":"https://github.com/mattdesl/2d-context","bugs":{"url":"https://github.com/mattdesl/2d-context/issues"},"gitHead":"b18e1aba2e4f949798e18341d4f671a352631b64","_id":"2d-context@1.3.0","_shasum":"7ca5c78a5f1e6585423e5f7ac556249d653c4194","_from":".","_npmVersion":"2.1.18","_nodeVersion":"0.10.32","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"7ca5c78a5f1e6585423e5f7ac556249d653c4194","tarball":"https://registry.npmjs.org/2d-context/-/2d-context-1.3.0.tgz","integrity":"sha512-OxivIPza/n6tZYe9iVTqm0dnRJlDoi3ezHMLkscaSqtb3yj5ObzbZUlF1OfMAIL5qxl9WR6WFktDA1KTkfc7KA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPNQKkUZh5EC2qrn54lYee+jPqL4FCnuUW61TaDyPjHQIgNvlMQL8EgjiIPferNXsXWYMWwpdVQ36tIFy7DXoKg0A="}]},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}]}},"readme":"# 2d-context\n\nGrabs a CanvasRenderingContext2D, returning null if it doesn't exist. Similar to [webgl-context](https://nodei.co/npm/webgl-context/).\n\n```js\nvar context = require('2d-context')()\nvar canvas = context.canvas\n```\n\nor\n\n```js\nvar canvas = document.createElement('canvas')\n\nvar context = require('2d-context')({\n    canvas: canvas,\n    alpha: true,\n    width: 256,\n    height: 256    \n})\n```\n\n## Usage\n\n[![NPM](https://nodei.co/npm/2d-context.png)](https://nodei.co/npm/2d-context/)\n\n#### `ctx = require('2d-context')([opt])`\n\nGets a new canvas context with optional parameters:\n\n- `canvas` a canvas element to use, otherwise creates a new element\n- `width` a width to set, otherwise no change\n- `height` a height to set, otherwise no change\n- other attributes are passed to the getContext call, like `alpha` and `storage`\n\nYou can then get a reference of the canvas element with `ctx.canvas`. \n\n## License\n\nMIT, see [LICENSE.md](http://github.com/mattdesl/2d-context/blob/master/LICENSE.md) for details.\n","maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"time":{"modified":"2022-06-12T14:06:51.103Z","created":"2015-01-04T21:31:18.481Z","1.0.1":"2015-01-04T21:31:18.481Z","1.0.2":"2015-01-04T21:33:43.021Z","1.1.0":"2015-01-04T21:50:17.844Z","1.2.0":"2015-01-14T16:35:36.295Z","1.3.0":"2015-06-11T18:03:03.772Z"},"homepage":"https://github.com/mattdesl/2d-context","keywords":["canvas","context","webgl-context","2d-context","2d","createElement","create","element"],"repository":{"type":"git","url":"git://github.com/mattdesl/2d-context.git"},"author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"bugs":{"url":"https://github.com/mattdesl/2d-context/issues"},"license":"MIT","readmeFilename":"README.md","users":{"fibo":true}}