{"_id":"@mapbox/link-hijacker","_rev":"411150","name":"@mapbox/link-hijacker","description":"Hijack clicks on and within links, probably for client-side routing","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"time":{"modified":"2021-08-04T05:08:59.000Z","created":"2017-06-25T23:02:02.625Z","1.1.0":"2018-01-11T14:58:31.005Z","1.0.0":"2017-09-08T19:24:31.624Z","0.4.0":"2017-08-25T19:08:11.286Z","0.3.2":"2017-08-08T23:37:52.949Z","0.3.1":"2017-07-23T15:27:15.250Z","0.3.0":"2017-07-01T01:34:53.334Z","0.2.2":"2017-06-30T22:21:56.873Z","0.2.1":"2017-06-30T21:45:09.908Z","0.2.0":"2017-06-30T02:01:48.350Z","0.1.0":"2017-06-25T23:02:02.625Z"},"users":{},"author":{"name":"Mapbox"},"repository":{"type":"git","url":"git+https://github.com/mapbox/link-hijacker.git"},"versions":{"1.1.0":{"name":"@mapbox/link-hijacker","version":"1.1.0","description":"Hijack clicks on and within links, probably for client-side routing","main":"index.js","scripts":{"format":"prettier --single-quote --write '{,test/**/}*.js'","precommit":"lint-staged","lint":"eslint .","test-manual":"budo test/manual/manual.js -l -d test/manual","start":"npm run test-manual","test-jest":"jest","pretest":"npm run lint","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/mapbox/link-hijacker.git"},"keywords":["client-side-routing","routing","hijack","links"],"author":{"name":"Mapbox"},"license":"MIT","bugs":{"url":"https://github.com/mapbox/link-hijacker/issues"},"homepage":"https://github.com/mapbox/link-hijacker#readme","devDependencies":{"budo":"^10.0.3","eslint":"^4.1.0","husky":"^0.14.1","jest":"^20.0.4","lint-staged":"^4.0.0","prettier":"^1.4.4"},"lint-staged":{"**/*.js":["eslint","prettier --single-quote --write","git add"]},"jest":{"coverageReporters":["text","html"],"clearMocks":true,"roots":["./test"]},"gitHead":"9e9ab4c49c07927046f9713cc19aa8329585d585","_id":"@mapbox/link-hijacker@1.1.0","_npmVersion":"5.6.0","_nodeVersion":"6.11.3","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"f14a68edabe45424d8bec7375ad13e18cac22bf8","size":8045,"noattachment":false,"key":"/@mapbox/link-hijacker/-/@mapbox/link-hijacker-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/link-hijacker/download/@mapbox/link-hijacker-1.1.0.tgz"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/link-hijacker-1.1.0.tgz_1515682710939_0.5179203967563808"},"directories":{},"publish_time":1515682711005,"_hasShrinkwrap":false,"_cnpm_publish_time":1515682711005},"1.0.0":{"name":"@mapbox/link-hijacker","version":"1.0.0","description":"Hijack clicks on and within links, probably for client-side routing","main":"index.js","scripts":{"format":"prettier --single-quote --write '{,test/**/}*.js'","precommit":"lint-staged","lint":"eslint .","test-manual":"budo test/manual/manual.js -l -d test/manual","start":"npm run test-manual","test-jest":"jest","pretest":"npm run lint","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/mapbox/link-hijacker.git"},"keywords":["client-side-routing","routing","hijack","links"],"author":{"name":"Mapbox"},"license":"MIT","bugs":{"url":"https://github.com/mapbox/link-hijacker/issues"},"homepage":"https://github.com/mapbox/link-hijacker#readme","devDependencies":{"budo":"^10.0.3","eslint":"^4.1.0","husky":"^0.14.1","jest":"^20.0.4","lint-staged":"^4.0.0","prettier":"^1.4.4"},"lint-staged":{"**/*.js":["eslint","prettier --single-quote --write","git add"]},"jest":{"coverageReporters":["text","html"],"clearMocks":true,"roots":["./test"]},"gitHead":"ac90db9440465f789e1bc415f106ccd951b1f289","_id":"@mapbox/link-hijacker@1.0.0","_npmVersion":"5.4.1","_nodeVersion":"6.11.1","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"ca7996ef6ddc77d9e5515583938e1dda2d1640d3","size":5368,"noattachment":false,"key":"/@mapbox/link-hijacker/-/@mapbox/link-hijacker-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/link-hijacker/download/@mapbox/link-hijacker-1.0.0.tgz"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/link-hijacker-1.0.0.tgz_1504898671508_0.2462970488704741"},"directories":{},"publish_time":1504898671624,"_hasShrinkwrap":false,"_cnpm_publish_time":1504898671624},"0.4.0":{"name":"@mapbox/link-hijacker","version":"0.4.0","description":"Hijack clicks on and within links, probably for client-side routing","main":"index.js","scripts":{"format":"prettier --single-quote --write '{,test/**/}*.js'","precommit":"lint-staged","lint":"eslint .","test-manual":"budo test/manual/manual.js -l -d test/manual","start":"npm run test-manual","test-jest":"jest","pretest":"npm run lint","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/mapbox/link-hijacker.git"},"keywords":["client-side-routing","routing","hijack","links"],"author":{"name":"Mapbox"},"license":"MIT","bugs":{"url":"https://github.com/mapbox/link-hijacker/issues"},"homepage":"https://github.com/mapbox/link-hijacker#readme","devDependencies":{"budo":"^10.0.3","eslint":"^4.1.0","husky":"^0.14.1","jest":"^20.0.4","lint-staged":"^4.0.0","prettier":"^1.4.4"},"lint-staged":{"**/*.js":["eslint","prettier --single-quote --write","git add"]},"jest":{"coverageReporters":["text","html"],"clearMocks":true,"roots":["./test"]},"gitHead":"a208db631cd60cd1f1cd6271770692324ac77378","_id":"@mapbox/link-hijacker@0.4.0","_npmVersion":"5.3.0","_nodeVersion":"6.11.1","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"03fa95ad81cc75da46482aeb97bb36212ef49e63","size":7867,"noattachment":false,"key":"/@mapbox/link-hijacker/-/@mapbox/link-hijacker-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/link-hijacker/download/@mapbox/link-hijacker-0.4.0.tgz"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/link-hijacker-0.4.0.tgz_1503688091149_0.8856820238288492"},"directories":{},"publish_time":1503688091286,"_cnpm_publish_time":1503688091286,"_hasShrinkwrap":false},"0.3.2":{"name":"@mapbox/link-hijacker","version":"0.3.2","description":"Hijack clicks on and within links, probably for client-side routing","main":"index.js","scripts":{"format":"prettier --single-quote --write '{,test/**/}*.js'","precommit":"lint-staged","lint":"eslint .","test-manual":"budo test/manual/manual.js -l -d test/manual","start":"npm run test-manual","test-jest":"jest","pretest":"npm run lint","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/mapbox/link-hijacker.git"},"keywords":["client-side-routing","routing","hijack","links"],"author":{"name":"Mapbox"},"license":"MIT","bugs":{"url":"https://github.com/mapbox/link-hijacker/issues"},"homepage":"https://github.com/mapbox/link-hijacker#readme","devDependencies":{"budo":"^10.0.3","eslint":"^4.1.0","husky":"^0.14.1","jest":"^20.0.4","lint-staged":"^4.0.0","prettier":"^1.4.4"},"lint-staged":{"**/*.js":["eslint","prettier --single-quote --write","git add"]},"jest":{"coverageReporters":["text","html"],"clearMocks":true,"roots":["./test"]},"gitHead":"5383746dc8ec56ffcf846c126db4f0b75c8c93ba","_id":"@mapbox/link-hijacker@0.3.2","_npmVersion":"5.3.0","_nodeVersion":"6.11.1","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"8af13a079c7113791abb4bfc0a2e97e808bcf75e","size":6603,"noattachment":false,"key":"/@mapbox/link-hijacker/-/@mapbox/link-hijacker-0.3.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/link-hijacker/download/@mapbox/link-hijacker-0.3.2.tgz"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/link-hijacker-0.3.2.tgz_1502235472763_0.36070083011873066"},"directories":{},"publish_time":1502235472949,"_hasShrinkwrap":false,"_cnpm_publish_time":1502235472949},"0.3.1":{"name":"@mapbox/link-hijacker","version":"0.3.1","description":"Hijack clicks on and within links, probably for client-side routing","main":"index.js","scripts":{"format":"prettier --single-quote --write '{,test/**/}*.js'","precommit":"lint-staged","lint":"eslint .","test-manual":"budo test/manual/manual.js -l -d test/manual","start":"npm run test-manual","test-jest":"jest","pretest":"npm run lint","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/mapbox/link-hijacker.git"},"keywords":["client-side-routing","routing","hijack","links"],"author":{"name":"Mapbox"},"license":"MIT","bugs":{"url":"https://github.com/mapbox/link-hijacker/issues"},"homepage":"https://github.com/mapbox/link-hijacker#readme","devDependencies":{"budo":"^10.0.3","eslint":"^4.1.0","husky":"^0.14.1","jest":"^20.0.4","lint-staged":"^4.0.0","prettier":"^1.4.4"},"lint-staged":{"{,test/**/}*.js":["eslint","prettier --single-quote --write","git add"]},"gitHead":"da124bcbe1a76164811792e87f253212a7fc42da","_id":"@mapbox/link-hijacker@0.3.1","_npmVersion":"5.3.0","_nodeVersion":"6.11.1","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"62043d53de5bddb8f3a1d9a07514693af58b91e2","size":46042,"noattachment":false,"key":"/@mapbox/link-hijacker/-/@mapbox/link-hijacker-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/link-hijacker/download/@mapbox/link-hijacker-0.3.1.tgz"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/link-hijacker-0.3.1.tgz_1500823635136_0.6569780157878995"},"directories":{},"publish_time":1500823635250,"_hasShrinkwrap":false,"_cnpm_publish_time":1500823635250},"0.3.0":{"name":"@mapbox/link-hijacker","version":"0.3.0","description":"Hijack clicks on and within links, probably for client-side routing","main":"index.js","scripts":{"format":"prettier --single-quote --write '{,test/**/}*.js'","precommit":"lint-staged","lint":"eslint .","test-manual":"budo test/manual/manual.js -l -d test/manual","start":"npm run test-manual","test-jest":"jest","pretest":"npm run lint","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/mapbox/link-hijacker.git"},"keywords":["client-side-routing","routing","hijack","links"],"author":{"name":"Mapbox"},"license":"MIT","bugs":{"url":"https://github.com/mapbox/link-hijacker/issues"},"homepage":"https://github.com/mapbox/link-hijacker#readme","devDependencies":{"budo":"^10.0.3","eslint":"^4.1.0","husky":"^0.14.1","jest":"^20.0.4","lint-staged":"^4.0.0","prettier":"^1.4.4"},"lint-staged":{"{,test/**/}*.js":["eslint","prettier --single-quote --write","git add"]},"gitHead":"7b74b4a995213ecd608a9fc268b90bca81a1c28d","_id":"@mapbox/link-hijacker@0.3.0","_npmVersion":"5.0.4","_nodeVersion":"6.11.0","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"c7c5c7884db5fa03b1b46ec01fc7c6a02bdeece2","size":45886,"noattachment":false,"key":"/@mapbox/link-hijacker/-/@mapbox/link-hijacker-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/link-hijacker/download/@mapbox/link-hijacker-0.3.0.tgz"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/link-hijacker-0.3.0.tgz_1498872893229_0.044571708887815475"},"directories":{},"publish_time":1498872893334,"_hasShrinkwrap":false,"_cnpm_publish_time":1498872893334},"0.2.2":{"name":"@mapbox/link-hijacker","version":"0.2.2","description":"Hijack clicks on and within links, probably for client-side routing","main":"index.js","scripts":{"format":"prettier --single-quote --write '{,test/**/}*.js'","precommit":"lint-staged","lint":"eslint .","test-manual":"budo test/manual/manual.js -l -d test/manual","start":"npm run test-manual","test-jest":"jest","pretest":"npm run lint","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/mapbox/link-hijacker.git"},"keywords":["client-side-routing","routing","hijack","links"],"author":{"name":"Mapbox"},"license":"MIT","bugs":{"url":"https://github.com/mapbox/link-hijacker/issues"},"homepage":"https://github.com/mapbox/link-hijacker#readme","devDependencies":{"budo":"^10.0.3","eslint":"^4.1.0","husky":"^0.14.1","jest":"^20.0.4","lint-staged":"^4.0.0","prettier":"^1.4.4"},"lint-staged":{"{,test/**/}*.js":["eslint","prettier --single-quote --write","git add"]},"gitHead":"cb4eff76918bbba8e0cea29011dfc5c47b5efe8d","_id":"@mapbox/link-hijacker@0.2.2","_npmVersion":"5.0.4","_nodeVersion":"6.11.0","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"d16b34b2ecf477ebac3a062fdc46ded64f308f29","size":45869,"noattachment":false,"key":"/@mapbox/link-hijacker/-/@mapbox/link-hijacker-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/link-hijacker/download/@mapbox/link-hijacker-0.2.2.tgz"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/link-hijacker-0.2.2.tgz_1498861316701_0.7987761495169252"},"directories":{},"publish_time":1498861316873,"_hasShrinkwrap":false,"_cnpm_publish_time":1498861316873},"0.2.1":{"name":"@mapbox/link-hijacker","version":"0.2.1","description":"Hijack clicks on and within links, probably for client-side routing","main":"index.js","scripts":{"format":"prettier --single-quote --write '{,test/**/}*.js'","precommit":"lint-staged","lint":"eslint .","test-manual":"budo test/manual/manual.js -l -d test/manual","start":"npm run test-manual","test-jest":"jest","pretest":"npm run lint","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/mapbox/link-hijacker.git"},"keywords":["client-side-routing","routing","hijack","links"],"author":{"name":"Mapbox"},"license":"MIT","bugs":{"url":"https://github.com/mapbox/link-hijacker/issues"},"homepage":"https://github.com/mapbox/link-hijacker#readme","devDependencies":{"budo":"^10.0.3","eslint":"^4.1.0","husky":"^0.14.1","jest":"^20.0.4","lint-staged":"^4.0.0","prettier":"^1.4.4"},"lint-staged":{"{,test/**/}*.js":["eslint","prettier --single-quote --write","git add"]},"gitHead":"dd62b18d81f6012352a51d36ec91762154daf817","_id":"@mapbox/link-hijacker@0.2.1","_npmVersion":"5.0.4","_nodeVersion":"6.11.0","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"f748ac479ed4b8b875d954ef1ce4100cff249e38","size":45860,"noattachment":false,"key":"/@mapbox/link-hijacker/-/@mapbox/link-hijacker-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/link-hijacker/download/@mapbox/link-hijacker-0.2.1.tgz"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/link-hijacker-0.2.1.tgz_1498859109819_0.013494970742613077"},"directories":{},"publish_time":1498859109908,"_hasShrinkwrap":false,"_cnpm_publish_time":1498859109908},"0.2.0":{"name":"@mapbox/link-hijacker","version":"0.2.0","description":"Hijack clicks on and within links, probably for client-side routing","main":"index.js","scripts":{"format":"prettier --single-quote --write '{,test/**/}*.js'","precommit":"lint-staged","lint":"eslint .","test-manual":"budo test/manual/manual.js -l -d test/manual","start":"npm run test-manual","test-jest":"jest","pretest":"npm run lint","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/mapbox/link-hijacker.git"},"keywords":["client-side-routing","routing","hijack","links"],"author":{"name":"Mapbox"},"license":"MIT","bugs":{"url":"https://github.com/mapbox/link-hijacker/issues"},"homepage":"https://github.com/mapbox/link-hijacker#readme","devDependencies":{"budo":"^10.0.3","eslint":"^4.1.0","husky":"^0.14.1","jest":"^20.0.4","lint-staged":"^4.0.0","prettier":"^1.4.4"},"lint-staged":{"{,test/**/}*.js":["eslint","prettier --single-quote --write","git add"]},"gitHead":"d5fb6fb097ae92f57caa16f1b2887c48eee1ff6e","_id":"@mapbox/link-hijacker@0.2.0","_npmVersion":"5.0.4","_nodeVersion":"6.11.0","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"74781b448037ab4a05c90e924999074612cd3f28","size":45757,"noattachment":false,"key":"/@mapbox/link-hijacker/-/@mapbox/link-hijacker-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/link-hijacker/download/@mapbox/link-hijacker-0.2.0.tgz"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/link-hijacker-0.2.0.tgz_1498788108258_0.19521010876633227"},"directories":{},"publish_time":1498788108350,"_hasShrinkwrap":false,"_cnpm_publish_time":1498788108350},"0.1.0":{"name":"@mapbox/link-hijacker","version":"0.1.0","description":"Hijack clicks on and within links, probably for client-side routing","main":"index.js","scripts":{"format":"prettier --single-quote --write '{,test/**/}*.js'","precommit":"lint-staged","lint":"eslint .","test-manual":"budo test/manual/test.js -l -d test/manual","test-jest":"jest","pretest":"npm run lint","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/mapbox/link-hijacker.git"},"keywords":["client-side-routing","routing","hijack","links"],"author":{"name":"Mapbox"},"license":"MIT","bugs":{"url":"https://github.com/mapbox/link-hijacker/issues"},"homepage":"https://github.com/mapbox/link-hijacker#readme","devDependencies":{"budo":"^10.0.3","eslint":"^4.1.0","husky":"^0.14.1","jest":"^20.0.4","lint-staged":"^4.0.0","prettier":"^1.4.4"},"lint-staged":{"{,test/**/}*.js":["prettier --single-quote --write","git add"]},"gitHead":"c7d0aacff3bd32405cfb56556315b8c2dd359a60","_id":"@mapbox/link-hijacker@0.1.0","_npmVersion":"5.0.3","_nodeVersion":"6.11.0","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"693c316fb180104ad6c8b44a8d0a34097d9cb737","size":45384,"noattachment":false,"key":"/@mapbox/link-hijacker/-/@mapbox/link-hijacker-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/link-hijacker/download/@mapbox/link-hijacker-0.1.0.tgz"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/link-hijacker-0.1.0.tgz_1498431722403_0.44350174395367503"},"directories":{},"publish_time":1498431722625,"_hasShrinkwrap":false,"_cnpm_publish_time":1498431722625}},"readme":"# @mapbox/link-hijacker\n\n[![Build Status](https://travis-ci.org/mapbox/link-hijacker.svg?branch=master)](https://travis-ci.org/mapbox/link-hijacker)\n\nHijack clicks on and within links, probably for client-side routing.\n\n![Pirates hijacking a ship](https://upload.wikimedia.org/wikipedia/commons/thumb/8/84/Painting_of_a_pirate_ship_%28after_1852%29%2C_after_Ambroise_Louis_Garneray.jpg/640px-Painting_of_a_pirate_ship_%28after_1852%29%2C_after_Ambroise_Louis_Garneray.jpg)\n\nImagine you're using client-side routing on your website, because you live in The Future.\nYou want nice, smooth, fast client-side routing whenever a link points to a client-side route (regardless of whether the code author remembered this). And you want a regular old page transition whenever a link does *not* point to a client-side route.\nThe easiest way to do this would be to use regular `<a>` elements all over your site, for *both* of these types of links.\nThat would be convenient, and also wouldn't force you or others to pay attention to which links should do client-side routing and which ones should not.\nThat seems like a better situation than, for example, using a [special component](https://reacttraining.com/react-router/web/api/Link) to distinguish between regular and client-side links.\n\nlink-hijacker provides the means to do this by hijacking all clicks on and within links, allowing you to determine how they are treated.\n\n- Listens for clicks.\n- Determines which clicks are on or within `<a>` elements with `href` attributes.\n- Determines whether those links should be hijacked, based on your options.\n- If a link should be hijacked, prevents default behavior and calls your callback.\n- In your callback, you might programmatically change pages.\n\nThis pattern has been implemented before, because it's clearly useful (see [\"Similar work\"]).\nBut there didn't seem to be a full-featured, well-tested, and actively maintained implementation that was not tied to a larger library.\nSo we made this one.\n\n## Typical example\n\n```js\nconst linkHijacker = require('@mapbox/link-hijacker');\n\nconst unhijack = linkHijacker.hijack((clickedLink, clickEvent) => {\n  // Determine whether the link points to a client-side route ...\n  if (linkPointsToClientSideRoute) {\n    // Use JS for to programmatically change the page ...\n  } else {\n    // Or else allow it to work like a regular link.\n    window.location.assign(clickedLink);\n  }\n});\n\n// Later, you can unhijack links.\nunhijack();\n```\n\nYou can now use `<a>` elements indiscriminately.\n\n## API\n\n### hijack\n\n`linkHijacker.hijack([options], callback)`\n\nReturns a function that can be used to remove event listeners, unhijacking links.\nCalls the `callback` whenever a link is hijacked.\n\n#### options\n\n##### root\n\nType: `HtmlElement`. Default: `document.documentElement`.\n\nLinks will be hijacked within this element.\n\n##### skipModifierKeys\n\nType: `boolean`. Default: `true`.\n\nBy default, clicks paired with modifiers keys (`ctrlKey`, `altKey`, `metaKey`, `shiftKey`) are *not* hijacked.\nIf this option is `false`, these clicks *will* be hijacked.\n\n##### skipDownload\n\nType: `boolean`. Default: `true`.\n\nBy default, links with the `download` attribute are *not* hijacked.\nIf this option is `false`, these links *will* be hijacked.\n\n##### skipTargetBlank\n\nType: `boolean`. Default: `true`.\n\nBy default, links with the attribute `target=\"_blank\"` are *not* hijacked.\nIf this option is `false`, these links *will* be hijacked.\n\n##### skipExternal\n\nType: `boolean`. Default: `true`.\n\nBy default, links with the attribute `rel=\"external\"` are *not* hijacked.\nIf this option is `false`, these links *will* be hijacked.\n\n##### skipMailTo\n\nType: `boolean`. Default: `true`.\n\nBy default, links whose `href` attributes start with `mailto:` are *not* hijacked.\nIf this option is `false`, these links *will* be hijacked.\n\n##### skipOtherOrigin\n\nType: `boolean`. Default: `true`.\n\nBy default, links pointing to other origins (protocol + domain) are *not* hijacked.\nIf this option is `false`, these links *will* be hijacked.\n\n##### skipFragment\n\nType: `boolean`. Default: `true`.\n\nBy default, links with `href` attributes starting with fragments (e.g. `href=\"#foo\"`) are *not* hijacked.\n(Links with `href` attributes that *include* fragments, but don't start with them, will still be hijacked, e.g. `href=\"some/page#foo\"`.)\nIf this option is `false`, these links *will* be hijacked.\n\n##### skipFilter\n\nType: `Function`.\n\nA filter function that receives the clicked link element and returns a truthy or falsey value indicating whether the link should be hijacked or not.\nIf it returns a falsey value, the link will be hijacked.\nIf the function returns a truthy value, the link will not be hijacked.\n\n##### preventDefault\n\nType: `boolean`. Default: `true`.\n\nBy default, `event.preventDefault()` will be called on any click events that are hijacked (are *not* skipped).\nIf this option is `false`, `event.preventDefault()` will *not* be called.\nYou could let the event continue as normal, or prevent default behavior yourself.\n\n#### callback\n\nType: `Function`.\n**Required.**\n\nWhenever a link is clicked, the `callback` will be invoked with two arguments:\n\n- `link`: The link element that was clicked on or within.\n- `event`: The `click` event.\n\n## Similar work\n\n- [page.js](https://github.com/visionmedia/page.js/blob/1034c8cbed600ea7da378a73716c885227c03270/index.js#L541-L601)\n- [nanohref]( https://github.com/yoshuawuyts/nanohref/blob/4efcc2c0becd2822a31c912364997cf03c66ab8d/index.js)\n- [whir-tools/hijack-links](https://github.com/whir-tools/hijack-links)\n\n[\"Similar work\"]: #similar-work\n","_attachments":{},"homepage":"https://github.com/mapbox/link-hijacker#readme","bugs":{"url":"https://github.com/mapbox/link-hijacker/issues"},"license":"MIT"}