{"_id":"vega-canvas","_rev":"3000845","name":"vega-canvas","description":"Canvas and Image utilities.","dist-tags":{"latest":"1.2.7"},"maintainers":[{"name":"jheer","email":""}],"time":{"modified":"2023-08-29T08:54:11.000Z","created":"2018-01-24T23:32:48.889Z","1.2.7":"2023-03-01T20:29:10.501Z","1.2.6":"2020-10-01T10:12:39.653Z","1.2.5":"2020-09-23T08:20:33.541Z","1.2.4":"2020-08-31T13:56:05.232Z","1.2.3":"2020-08-18T12:28:31.910Z","1.2.2":"2020-04-27T09:02:24.922Z","1.2.1":"2019-02-26T23:58:19.805Z","1.2.0":"2019-02-18T21:18:40.148Z","1.1.0":"2018-05-10T04:08:03.410Z","1.0.1":"2018-01-30T18:17:17.906Z","1.0.0":"2018-01-24T23:32:48.889Z"},"users":{},"author":{"name":"Jeffrey Heer","url":"http://idl.cs.washington.edu"},"repository":{"type":"git","url":"git+https://github.com/vega/vega.git"},"versions":{"1.2.7":{"name":"vega-canvas","version":"1.2.7","description":"Canvas and Image utilities.","keywords":["vega","canvas","image"],"license":"BSD-3-Clause","author":{"name":"Jeffrey Heer","url":"http://idl.cs.washington.edu"},"main":"build/vega-canvas.node.js","module":"build/vega-canvas.node.module.js","unpkg":"build/vega-canvas.min.js","jsdelivr":"build/vega-canvas.min.js","repository":{"type":"git","url":"git+https://github.com/vega/vega.git"},"browser":{"./build/vega-canvas.node.js":"./build/vega-canvas.browser.js","./build/vega-canvas.node.module.js":"./build/vega-canvas.browser.module.js"},"scripts":{"prebuild":"rimraf build","build":"rollup -c rollup.config.mjs","pretest":"yarn build --config-test","test":"tape 'test/**/*-test.js'","prepublishOnly":"yarn test && yarn build"},"gitHead":"fb1092f6b931d450f9c210b67ae4752bd3dd461b","bugs":{"url":"https://github.com/vega/vega/issues"},"homepage":"https://github.com/vega/vega#readme","_id":"vega-canvas@1.2.7","_nodeVersion":"18.3.0","_npmVersion":"lerna/6.5.1/node@v18.3.0+arm64 (darwin)","dist":{"shasum":"cf62169518f5dcd91d24ad352998c2248f8974fb","size":4056,"noattachment":false,"key":"/vega-canvas/-/vega-canvas-1.2.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/vega-canvas/download/vega-canvas-1.2.7.tgz"},"_npmUser":{"name":"jheer","email":"jeffrey.heer@gmail.com"},"directories":{},"maintainers":[{"name":"jheer","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vega-canvas_1.2.7_1677702550308_0.06084774569827234"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-03-01T20:29:10.501Z","publish_time":1677702550501,"_cnpm_publish_time":1677702550501},"1.2.6":{"name":"vega-canvas","version":"1.2.6","description":"Canvas and Image utilities.","keywords":["vega","canvas","image"],"license":"BSD-3-Clause","author":{"name":"Jeffrey Heer","url":"http://idl.cs.washington.edu"},"main":"build/vega-canvas.node.js","module":"build/vega-canvas.module.js","unpkg":"build/vega-canvas.min.js","jsdelivr":"build/vega-canvas.js","repository":{"type":"git","url":"git+https://github.com/vega/vega.git"},"scripts":{"prebuild":"rimraf build","build":"rollup -c --config-browser","pretest":"yarn build --config-test","test":"tape 'test/**/*-test.js'","prepublishOnly":"yarn test && yarn build"},"browser":{"./build/vega-canvas.node.js":"./build/vega-canvas.min.js","./build/vega-canvas.module.js":"./index.browser.js"},"gitHead":"c58de105bb4cd33ed74d2b6a02d551f5c11d72c7","bugs":{"url":"https://github.com/vega/vega/issues"},"homepage":"https://github.com/vega/vega#readme","_id":"vega-canvas@1.2.6","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (darwin)","dist":{"shasum":"55e032ce9a62acd17229f6bac66d99db3d6879cd","size":3982,"noattachment":false,"key":"/vega-canvas/-/vega-canvas-1.2.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/vega-canvas/download/vega-canvas-1.2.6.tgz"},"maintainers":[{"name":"jheer","email":""}],"_npmUser":{"name":"jheer","email":"jeffrey.heer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vega-canvas_1.2.6_1601547159478_0.21589329702909565"},"_hasShrinkwrap":false,"publish_time":1601547159653,"_cnpm_publish_time":1601547159653,"_cnpmcore_publish_time":"2021-12-16T21:58:50.972Z"},"1.2.5":{"name":"vega-canvas","version":"1.2.5","description":"Canvas and Image utilities.","keywords":["vega","canvas","image"],"license":"BSD-3-Clause","author":{"name":"Jeffrey Heer","url":"http://idl.cs.washington.edu"},"main":"build/vega-canvas.node.js","module":"build/vega-canvas.module.js","unpkg":"build/vega-canvas.min.js","jsdelivr":"build/vega-canvas.js","repository":{"type":"git","url":"git+https://github.com/vega/vega.git"},"scripts":{"prebuild":"rimraf build","build":"rollup -c --config-browser","pretest":"yarn build --config-test","test":"tape 'test/**/*-test.js'","prepublishOnly":"yarn test && yarn build"},"browser":{"./build/vega-canvas.node.js":"./build/vega-canvas.js","./index.js":"./index.browser.js"},"gitHead":"4affcbedb9d14815dbb6d3b250ed231b54fc95c0","bugs":{"url":"https://github.com/vega/vega/issues"},"homepage":"https://github.com/vega/vega#readme","_id":"vega-canvas@1.2.5","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (darwin)","dist":{"shasum":"c332bad588893391b583fbeb0c95e1143127f797","size":3901,"noattachment":false,"key":"/vega-canvas/-/vega-canvas-1.2.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/vega-canvas/download/vega-canvas-1.2.5.tgz"},"maintainers":[{"name":"jheer","email":""}],"_npmUser":{"name":"jheer","email":"jeffrey.heer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vega-canvas_1.2.5_1600849233441_0.04874820825875781"},"_hasShrinkwrap":false,"publish_time":1600849233541,"_cnpm_publish_time":1600849233541,"_cnpmcore_publish_time":"2021-12-16T21:58:51.172Z"},"1.2.4":{"name":"vega-canvas","version":"1.2.4","description":"Canvas and Image utilities.","keywords":["vega","canvas","image"],"license":"BSD-3-Clause","author":{"name":"Jeffrey Heer","url":"http://idl.cs.washington.edu"},"main":"build/vega-canvas.node.js","module":"index","unpkg":"build/vega-canvas.js","jsdelivr":"build/vega-canvas.js","repository":{"type":"git","url":"git+https://github.com/vega/vega.git"},"scripts":{"rollup":"rollup -f cjs -n vega -o build/vega-canvas.node.js -- index.js && rollup -f umd -n vega -o build/vega-canvas.js -- index.browser.js","prebuild":"rimraf build && mkdir build","build":"yarn rollup","pretest":"yarn prebuild && yarn rollup","test":"tape 'test/**/*-test.js'","prepublishOnly":"yarn test && yarn build","postpublish":"git push && git push --tags"},"browser":{"./build/vega-canvas.node.js":"./build/vega-canvas.js","./index.js":"./index.browser.js"},"gitHead":"8d6793f4ca7eaaf2d22186764e9ce2dae687cf52","bugs":{"url":"https://github.com/vega/vega/issues"},"homepage":"https://github.com/vega/vega#readme","_id":"vega-canvas@1.2.4","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (darwin)","dist":{"shasum":"02121ec0575fdd4c8d235ab2ee8c092490c72b3e","size":3391,"noattachment":false,"key":"/vega-canvas/-/vega-canvas-1.2.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/vega-canvas/download/vega-canvas-1.2.4.tgz"},"maintainers":[{"name":"jheer","email":""}],"_npmUser":{"name":"jheer","email":"jeffrey.heer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vega-canvas_1.2.4_1598882165123_0.38460127617065654"},"_hasShrinkwrap":false,"publish_time":1598882165232,"_cnpm_publish_time":1598882165232,"_cnpmcore_publish_time":"2021-12-16T21:58:51.365Z"},"1.2.3":{"name":"vega-canvas","version":"1.2.3","description":"Canvas and Image utilities.","keywords":["vega","canvas","image"],"license":"BSD-3-Clause","author":{"name":"Jeffrey Heer","url":"http://idl.cs.washington.edu"},"main":"build/vega-canvas.node.js","module":"index","unpkg":"build/vega-canvas.js","jsdelivr":"build/vega-canvas.js","repository":{"type":"git","url":"git+https://github.com/vega/vega.git"},"scripts":{"rollup":"rollup -f cjs -n vega -o build/vega-canvas.node.js -- index.js && rollup -f umd -n vega -o build/vega-canvas.js -- index.browser.js","prebuild":"rimraf build && mkdir build","build":"yarn rollup","pretest":"yarn prebuild && yarn rollup","test":"tape 'test/**/*-test.js'","prepublishOnly":"yarn test && yarn build","postpublish":"git push && git push --tags"},"browser":{"./build/vega-canvas.node.js":"./build/vega-canvas.js","./index.js":"./index.browser.js"},"gitHead":"28db83352e43e321dfe55fc5cb6489b211e45662","bugs":{"url":"https://github.com/vega/vega/issues"},"homepage":"https://github.com/vega/vega#readme","_id":"vega-canvas@1.2.3","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"shasum":"19502a73fc636fdf76eef43553098e7f90852158","size":3392,"noattachment":false,"key":"/vega-canvas/-/vega-canvas-1.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/vega-canvas/download/vega-canvas-1.2.3.tgz"},"maintainers":[{"name":"jheer","email":""}],"_npmUser":{"name":"jheer","email":"jeffrey.heer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vega-canvas_1.2.3_1597753711804_0.6045667984174588"},"_hasShrinkwrap":false,"publish_time":1597753711910,"_cnpm_publish_time":1597753711910,"_cnpmcore_publish_time":"2021-12-16T21:58:51.707Z"},"1.2.2":{"name":"vega-canvas","version":"1.2.2","description":"Canvas and Image utilities.","keywords":["vega","canvas","image"],"license":"BSD-3-Clause","author":{"name":"Jeffrey Heer","url":"http://idl.cs.washington.edu"},"main":"build/vega-canvas.node.js","module":"index","unpkg":"build/vega-canvas.js","jsdelivr":"build/vega-canvas.js","repository":{"type":"git","url":"git+https://github.com/vega/vega.git"},"scripts":{"rollup":"rollup -f cjs -n vega -o build/vega-canvas.node.js -- index.js && rollup -f umd -n vega -o build/vega-canvas.js -- index.browser.js","prebuild":"rimraf build && mkdir build","build":"yarn rollup","pretest":"yarn prebuild && yarn rollup","test":"tape 'test/**/*-test.js'","prepublishOnly":"yarn test && yarn build","postpublish":"git push && git push --tags"},"browser":{"./build/vega-canvas.node.js":"./build/vega-canvas.js","./index.js":"./index.browser.js"},"gitHead":"35e31c5c6b54db9dc3a577b5adad8d15ec274d32","bugs":{"url":"https://github.com/vega/vega/issues"},"homepage":"https://github.com/vega/vega#readme","_id":"vega-canvas@1.2.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"shasum":"f31aae9ac1e1ed01bb7817a1e53099279e2d3d43","size":3244,"noattachment":false,"key":"/vega-canvas/-/vega-canvas-1.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/vega-canvas/download/vega-canvas-1.2.2.tgz"},"maintainers":[{"name":"jheer","email":""}],"_npmUser":{"name":"jheer","email":"jeffrey.heer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vega-canvas_1.2.2_1587978144712_0.9274279358843105"},"_hasShrinkwrap":false,"publish_time":1587978144922,"_cnpm_publish_time":1587978144922,"_cnpmcore_publish_time":"2021-12-16T21:58:51.904Z"},"1.2.1":{"name":"vega-canvas","version":"1.2.1","description":"Canvas and Image utilities.","keywords":["vega","canvas","image"],"license":"BSD-3-Clause","author":{"name":"Jeffrey Heer","url":"http://idl.cs.washington.edu"},"main":"build/vega-canvas.node.js","module":"index","unpkg":"build/vega-canvas.js","jsdelivr":"build/vega-canvas.js","repository":{"type":"git","url":"git+https://github.com/vega/vega.git"},"scripts":{"rollup":"rollup -f cjs -n vega -o build/vega-canvas.node.js -- index.js && rollup -f umd -n vega -o build/vega-canvas.js -- index.browser.js","prebuild":"rimraf build && mkdir build","build":"yarn rollup","pretest":"yarn prebuild && yarn rollup","test":"tape 'test/**/*-test.js' && eslint index.js index.browser.js src test","prepublishOnly":"yarn test && yarn build","postpublish":"git push && git push --tags"},"browser":{"./build/vega-canvas.node.js":"./build/vega-canvas.js","./index.js":"./index.browser.js"},"gitHead":"0f0e009069ae0291458398a747f024c693c201d9","bugs":{"url":"https://github.com/vega/vega/issues"},"homepage":"https://github.com/vega/vega#readme","_id":"vega-canvas@1.2.1","_nodeVersion":"10.14.1","_npmVersion":"lerna/3.13.1/node@v10.14.1+x64 (darwin)","dist":{"shasum":"ee0586e2a1f096f6a5d1710df61ef501562c2bd4","size":3279,"noattachment":false,"key":"/vega-canvas/-/vega-canvas-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/vega-canvas/download/vega-canvas-1.2.1.tgz"},"maintainers":[{"name":"jheer","email":""}],"_npmUser":{"name":"jheer","email":"jeffrey.heer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vega-canvas_1.2.1_1551225499694_0.060750735039617476"},"_hasShrinkwrap":false,"publish_time":1551225499805,"_cnpm_publish_time":1551225499805,"_cnpmcore_publish_time":"2021-12-16T21:58:52.128Z"},"1.2.0":{"name":"vega-canvas","version":"1.2.0","description":"Canvas and Image utilities.","keywords":["vega","canvas","image"],"license":"BSD-3-Clause","author":{"name":"Jeffrey Heer","url":"http://idl.cs.washington.edu"},"main":"build/vega-canvas.node.js","module":"index","repository":{"type":"git","url":"https://github.com/vega/vega.git"},"scripts":{"rollup":"rollup -f cjs -n vega -o build/vega-canvas.node.js -- index.js && rollup -f umd -n vega -o build/vega-canvas.js -- index.browser.js","prebuild":"rimraf build && mkdir build","build":"yarn rollup","pretest":"yarn prebuild && yarn rollup","test":"tape 'test/**/*-test.js' && eslint index.js index.browser.js src test","prepublishOnly":"yarn test && yarn build","postpublish":"git push && git push --tags"},"browser":{"./build/vega-canvas.node.js":"./build/vega-canvas.js","./index.js":"./index.browser.js"},"licenseText":"Copyright (c) 2015-2018, University of Washington Interactive Data Lab\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors\n  may be used to endorse or promote products derived from this software\n  without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","_id":"vega-canvas@1.2.0","dist":{"shasum":"aa0fbb9603e2db50d2bb9d46d886550e855b36a4","size":3303,"noattachment":false,"key":"/vega-canvas/-/vega-canvas-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/vega-canvas/download/vega-canvas-1.2.0.tgz"},"maintainers":[{"name":"jheer","email":""}],"_npmUser":{"name":"jheer","email":"jeffrey.heer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vega-canvas_1.2.0_1550524720035_0.7938561159006154"},"_hasShrinkwrap":false,"publish_time":1550524720148,"_cnpm_publish_time":1550524720148,"_cnpmcore_publish_time":"2021-12-16T21:58:52.343Z"},"1.1.0":{"name":"vega-canvas","version":"1.1.0","description":"Canvas and Image utilities.","keywords":["vega","canvas","image"],"license":"BSD-3-Clause","author":{"name":"Jeffrey Heer","url":"http://idl.cs.washington.edu"},"main":"build/vega-canvas.node.js","jsnext:main":"index","module":"index","repository":{"type":"git","url":"git+https://github.com/vega/vega-canvas.git"},"scripts":{"build":"npm run test && uglifyjs build/vega-canvas.js -c -m -o build/vega-canvas.min.js","pretest":"rm -rf build && mkdir build && rollup -f umd -n vega -o build/vega-canvas.node.js -- index.js && rollup -f umd -n vega -o build/vega-canvas.js -- index.browser.js","test":"tape 'test/**/*-test.js' && eslint index.js src test","prepublishOnly":"npm run build","postpublish":"git push && git push --tags && zip -j build/vega-canvas.zip -- LICENSE README.md build/vega-canvas.node.js build/vega-canvas.js build/vega-canvas.min.js"},"devDependencies":{"eslint":"4","rollup":"0.58.2","tape":"4","uglify-js":"3","canvas":"^1.6.10","canvas-prebuilt":"^1.6.5-prerelease.1"},"browser":{"./build/vega-canvas.node.js":"./build/vega-canvas.js","./index.js":"./index.browser.js"},"gitHead":"66f372015e2623eb933ba79d1be30a0f69252329","bugs":{"url":"https://github.com/vega/vega-canvas/issues"},"homepage":"https://github.com/vega/vega-canvas#readme","_id":"vega-canvas@1.1.0","_npmVersion":"6.0.0","_nodeVersion":"10.1.0","_npmUser":{"name":"jheer","email":"jeffrey.heer@gmail.com"},"dist":{"shasum":"99ce74d4510a46fc9ed1a8721014da725898ec9f","size":19794,"noattachment":false,"key":"/vega-canvas/-/vega-canvas-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/vega-canvas/download/vega-canvas-1.1.0.tgz"},"maintainers":[{"name":"jheer","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vega-canvas_1.1.0_1525925283276_0.8735361123485905"},"_hasShrinkwrap":false,"publish_time":1525925283410,"_cnpm_publish_time":1525925283410,"_cnpmcore_publish_time":"2021-12-16T21:58:53.001Z"},"1.0.1":{"name":"vega-canvas","version":"1.0.1","description":"Canvas and Image object instantiation utilities.","keywords":["vega","canvas","image"],"license":"BSD-3-Clause","author":{"name":"Jeffrey Heer","url":"http://idl.cs.washington.edu"},"main":"build/vega-canvas.js","jsnext:main":"index","module":"index","repository":{"type":"git","url":"git+https://github.com/vega/vega-canvas.git"},"scripts":{"build":"npm run test && uglifyjs build/vega-canvas.js -c -m -o build/vega-canvas.min.js","pretest":"rm -rf build && mkdir build && rollup -f umd -n vega -o build/vega-canvas.js -- index.js","test":"tape 'test/**/*-test.js' && eslint index.js src test","prepublish":"npm run build","postpublish":"git push && git push --tags && zip -j build/vega-canvas.zip -- LICENSE README.md build/vega-canvas.js build/vega-canvas.min.js"},"devDependencies":{"eslint":"4","rollup":"0.43","tape":"4","uglify-js":"3","canvas":"^1.6","canvas-prebuilt":"^1.6"},"browser":{"canvas":false,"canvas-prebuilt":false},"gitHead":"b226dff6df4dea61a06a6a198dc62d6432c45427","bugs":{"url":"https://github.com/vega/vega-canvas/issues"},"homepage":"https://github.com/vega/vega-canvas#readme","_id":"vega-canvas@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"9.3.0","_npmUser":{"name":"jheer","email":"jeffrey.heer@gmail.com"},"dist":{"shasum":"22cfa510af0cfbd920fc6af8b6111d3de5e63c44","size":3796,"noattachment":false,"key":"/vega-canvas/-/vega-canvas-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/vega-canvas/download/vega-canvas-1.0.1.tgz"},"maintainers":[{"name":"jheer","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vega-canvas-1.0.1.tgz_1517336236550_0.6641146396286786"},"directories":{},"publish_time":1517336237906,"_hasShrinkwrap":false,"_cnpm_publish_time":1517336237906,"_cnpmcore_publish_time":"2021-12-16T21:58:53.217Z"},"1.0.0":{"name":"vega-canvas","version":"1.0.0","description":"Canvas and Image object instantiation utilities.","keywords":["vega","canvas","image"],"license":"BSD-3-Clause","author":{"name":"Jeffrey Heer","url":"http://idl.cs.washington.edu"},"main":"build/vega-canvas.js","jsnext:main":"index","module":"index","repository":{"type":"git","url":"git+https://github.com/vega/vega-canvas.git"},"scripts":{"build":"npm run test && uglifyjs build/vega-canvas.js -c -m -o build/vega-canvas.min.js","pretest":"rm -rf build && mkdir build && rollup -f umd -n vega -o build/vega-canvas.js -- index.js","test":"tape 'test/**/*-test.js' && eslint index.js src test","prepublish":"npm run build","postpublish":"git push && git push --tags && zip -j build/vega-canvas.zip -- LICENSE README.md build/vega-canvas.js build/vega-canvas.min.js"},"devDependencies":{"eslint":"4","rollup":"0.43","tape":"4","uglify-js":"3","canvas":"^1.6","canvas-prebuilt":"^1.6"},"browser":{"canvas":null,"canvas-prebuilt":null},"gitHead":"69028fd8f01aa777268ea060acec4392e0c8a810","bugs":{"url":"https://github.com/vega/vega-canvas/issues"},"homepage":"https://github.com/vega/vega-canvas#readme","_id":"vega-canvas@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.3.0","_npmUser":{"name":"jheer","email":"jeffrey.heer@gmail.com"},"dist":{"shasum":"c71a27b58b2cfba1ca680cb4cfb5d07beca3fe98","size":3781,"noattachment":false,"key":"/vega-canvas/-/vega-canvas-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/vega-canvas/download/vega-canvas-1.0.0.tgz"},"maintainers":[{"name":"jheer","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vega-canvas-1.0.0.tgz_1516836768830_0.8269170019775629"},"directories":{},"publish_time":1516836768889,"_hasShrinkwrap":false,"_cnpm_publish_time":1516836768889,"_cnpmcore_publish_time":"2021-12-16T21:58:53.465Z"}},"readme":"# vega-canvas\n\n[Canvas](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) and [Image](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image)  object instantiation utilities. Creates an [HTML5 Canvas](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API), using either the web browser DOM or a [node-canvas](https://github.com/Automattic/node-canvas) library.\n\nThis package attempts three forms of canvas creation, in this order:\n\n- If in a browser environment, use DOM methods to create a new canvas.\n- If the [node-canvas](https://github.com/Automattic/node-canvas) library is present, use that.\n- Otherwise, return `null`.\n\nTo ensure error-free build processes for client-side code, this module does not include any direct or optional dependencies on the [node-canvas](https://github.com/Automattic/node-canvas) library. Projects that use this pacakge and require canvas support for server-side (node.js) operations *must include a canvas dependency in their own `package.json` file*.\n\n## API Reference\n\n<a name=\"canvas\" href=\"#canvas\">#</a>\nvega.<b>canvas</b>([<i>width</i>, <i>height</i>, <i>type</i>])\n[<>](https://github.com/vega/vega/blob/master/packages/vega-canvas/index.js \"Source\")\n\nCreates a new [Canvas](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) instance, with an optional *width* and *height* (in pixels). If *width* and *height* are omitted, creates a _0 x 0_ canvas. The optional *type* parameter is a [node-canvas type parameter](https://github.com/Automattic/node-canvas#createcanvas) to enable PDF or SVG output modes; this parameter is applied only if node-canvas is used. This method first attempts to create a canvas using the DOM `document.createElement` method. If that fails, the method then attempts to instantiate a canvas using the [node-canvas](https://github.com/Automattic/node-canvas) library. If that also fails, returns `null`.\n\n<a name=\"domCanvas\" href=\"#domCanvas\">#</a>\nvega.<b>domCanvas</b>([<i>width</i>, <i>height</i>])\n[<>](https://github.com/vega/vega/blob/master/packages/vega-canvas/src/domCanvas.js \"Source\")\n\nCreates a new [Canvas](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) instance, with an optional *width* and *height* (in pixels). If *width* and *height* are omitted, creates a _0 x 0_ canvas. This method first attempts to create a canvas using the DOM `document.createElement` method. If that fails, returns `null`.\n\n<a name=\"nodeCanvas\" href=\"#nodeCanvas\">#</a>\nvega.<b>nodeCanvas</b>([<i>width</i>, <i>height</i>, <i>type</i>])\n[<>](https://github.com/vega/vega/blob/master/packages/vega-canvas/src/nodeCanvas.js \"Source\")\n\nCreates a new [Canvas](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) instance, with an optional *width* and *height* (in pixels). If *width* and *height* are omitted, creates a _0 x 0_ canvas. The optional *type* parameter is a [node-canvas type parameter](https://github.com/Automattic/node-canvas#createcanvas) to enable PDF or SVG output modes.  This method attempts to instantiate a canvas using using the [node-canvas](https://github.com/Automattic/node-canvas) library. If that fails, returns `null`. This method is not exported in browser-only builds.\n\n<a name=\"image\" href=\"#image\">#</a>\nvega.<b>image</b>()\n[<>](https://github.com/vega/vega/blob/master/packages/vega-canvas/index.js \"Source\")\n\nReturns a reference to the [Image](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image) constructor. In a web browser environment, simply returns the built-in `Image` object. Otherwise, attempts to return the `Image` instance exported by a node canvas library. If all attempts to find a canvas library fail, returns `null`.\n","_attachments":{},"homepage":"https://github.com/vega/vega#readme","bugs":{"url":"https://github.com/vega/vega/issues"},"license":"BSD-3-Clause"}