{"_id":"match-at","_rev":"2766996","name":"match-at","description":"Relocatable regular expressions.","dist-tags":{"latest":"0.1.1"},"maintainers":[{"name":"ariabuckles","email":"aria@khanacademy.org"},{"name":"sophiebits","email":"npm2@sophiebits.com"}],"time":{"modified":"2022-04-13T05:52:13.000Z","created":"2015-03-27T03:06:00.427Z","0.1.1":"2017-09-06T02:03:02.727Z","0.1.0":"2015-03-27T03:06:00.427Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/sophiebits/match-at.git"},"versions":{"0.1.1":{"name":"match-at","version":"0.1.1","description":"Relocatable regular expressions.","repository":{"type":"git","url":"git+https://github.com/sophiebits/match-at.git"},"main":"lib/matchAt.js","files":["lib/"],"devDependencies":{"babel-cli":"^6.26.0","babel-jest":"^21.0.0","babel-plugin-syntax-flow":"^6.18.0","babel-plugin-transform-flow-strip-types":"^6.22.0","jest":"^21.0.1"},"scripts":{"prepublish":"babel --no-babelrc --plugins syntax-flow -d lib/ src/ && mv lib/matchAt.js lib/matchAt.js.flow && babel -d lib/ src/","test":"jest"},"babel":{"plugins":["transform-flow-strip-types"]},"gitHead":"4921ff66e58f7acd2d4f856504c7a3657b69ec6f","bugs":{"url":"https://github.com/sophiebits/match-at/issues"},"homepage":"https://github.com/sophiebits/match-at#readme","_id":"match-at@0.1.1","_npmVersion":"5.3.0","_nodeVersion":"8.2.1","_npmUser":{"name":"ariabuckles","email":"aria@classjourney.org"},"dist":{"shasum":"25d040d291777704d5e6556bbb79230ec2de0540","size":2721,"noattachment":false,"key":"/match-at/-/match-at-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/match-at/download/match-at-0.1.1.tgz"},"maintainers":[{"name":"ariabuckles","email":"aria@khanacademy.org"},{"name":"sophiebits","email":"npm2@sophiebits.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/match-at-0.1.1.tgz_1504663382647_0.7046560752205551"},"directories":{},"publish_time":1504663382727,"_hasShrinkwrap":false,"_cnpm_publish_time":1504663382727,"_cnpmcore_publish_time":"2021-12-16T20:18:21.650Z"},"0.1.0":{"name":"match-at","version":"0.1.0","description":"Relocatable regular expressions.","repository":{"type":"git","url":"https://github.com/spicyj/match-at"},"main":"lib/matchAt.js","files":["lib/"],"devDependencies":{"babel":"^4.7.16","jest-cli":"^0.4.0","react-tools":"^0.13.1"},"jest":{"scriptPreprocessor":"<rootDir>/jestSupport/preprocessor.js","unmockedModulePathPatterns":[""]},"scripts":{"prepublish":"babel -d lib/ src/","test":"jest"},"gitHead":"4197daff69720734c72ba3321ed68a41c0527fb2","bugs":{"url":"https://github.com/spicyj/match-at/issues"},"homepage":"https://github.com/spicyj/match-at","_id":"match-at@0.1.0","_shasum":"f561e7709ff9a105b85cc62c6b8ee7c15bf24f31","_from":".","_npmVersion":"2.2.0","_nodeVersion":"0.10.35","_npmUser":{"name":"spicyj","email":"ben@benalpert.com"},"maintainers":[{"name":"ariabuckles","email":"aria@khanacademy.org"},{"name":"sophiebits","email":"npm2@sophiebits.com"}],"dist":{"shasum":"f561e7709ff9a105b85cc62c6b8ee7c15bf24f31","size":2180,"noattachment":false,"key":"/match-at/-/match-at-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/match-at/download/match-at-0.1.0.tgz"},"directories":{},"publish_time":1427425560427,"_hasShrinkwrap":false,"_cnpm_publish_time":1427425560427,"_cnpmcore_publish_time":"2021-12-16T20:18:21.859Z"}},"readme":"# match-at [![Build Status](https://travis-ci.org/spicyj/match-at.svg?branch=master)](https://travis-ci.org/spicyj/match-at)\n\n## Introduction\n\nLike `String.prototype.match` if it only checked the regex at the given index instead of searching the entire string.\n\n```js\nmatchAt(/world/, 'hello world', 6);  // ['world']\nmatchAt(/world/, 'hello world', 0);  // null\n```\n\nAlmost like `'hello world'.slice(i).match(/^world/)` except the resulting match object's `.index` property corresponds to the original string, and it doesn't actually slice the string. Most engines optimize taking a substring so this probably isn't particularly valuable in practice, but it was an entertaining exercise and could be useful if you reminisce about these semantics.\n\n## License\n\nMIT.\n","_attachments":{},"homepage":"https://github.com/sophiebits/match-at#readme","bugs":{"url":"https://github.com/sophiebits/match-at/issues"}}