{"main":"./src/oniguruma.js","name":"oniguruma","description":"oniguruma regular expression library","version":"7.0.1","licenses":[{"type":"MIT","url":"http://github.com/atom/node-oniguruma/raw/master/LICENSE.md"}],"repository":{"type":"git","url":"git+https://github.com/atom/node-oniguruma.git"},"bugs":{"url":"https://github.com/atom/node-oniguruma/issues"},"homepage":"http://atom.github.io/node-oniguruma","keywords":["regex","regexp","re","regular expression","async"],"devDependencies":{"async":"~0.9.0","jasmine-focused":"~1.0.7"},"dependencies":{"nan":"^2.10.0"},"scripts":{"test":"jasmine-focused --captureExceptions spec/","benchmark":"benchmark/benchmark.coffee","install":"node-gyp rebuild"},"gypfile":true,"gitHead":"edd2d2c4f4d06a736f3e262dc4884cab24695956","_id":"oniguruma@7.0.1","_npmVersion":"6.2.0","_nodeVersion":"8.4.0","_npmUser":{"name":"maxbrunsfeld","email":"maxbrunsfeld@gmail.com"},"dist":{"integrity":"sha512-PklYbBoYceHuoag91e1HFmZXO7SvMeEl8dXNyVvEaYW+1JNPKFI9P6G6ODm9Q3MivQPOBGg+9Zs1Li+2owbwQQ==","shasum":"76230211e96bb27b10cf2a7ccb99a6057ff1b9bf","tarball":"http://registry-npm.ywwl.com/oniguruma/download/oniguruma-7.0.1.tgz","fileCount":123,"unpackedSize":2745828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbViHMCRA9TVsSAnZWagAAIlAP/jr+V+ZZXAjdefau5KWD\nTCETRaNrKpuOEKSicQ+CaC/ejVzMjNz+7Er/vFkCtqzKxi+iAjq62GnpsBJN\nIa9WTPxYX+C9ZVoeCIl/soK7kjvx3vz83iE35qtWcCM6zBKUrAmQPhSMxbiW\nhfPRMT5JWgxWRMotdaq/im+RgDkGHe4wWjn3mlZbL1MZ9ghGhRjEwq6Dzwxf\nAiIu5mMXVbiNnapiA55pcubm4+BcKILFSb4c57JUhxXD4FkljYGxmslZUX1b\nNaELNj7246IgmcaJ3wERrkPr8/mieOBv2QosHNALlvgmy3jCbtL4Nwz3/4YW\nFpcnxRTvf5tAhjfp+UWUihlR55hlPFlnURq1MZENrN4hEcFJLAGoX4P46yoL\nP84uUNNtaC3K0RUI40ft1iEHhhOTdDEnTHfmnzlom7sIT8yOOHGSlgMDdvFE\nHfyFuJueQJnx2KihMi1QPJvbexqhsgQgNdlnmcpViqLeHvuc7m0NFm5YR5Rg\nPLptJ8jOT9KC11ipR8cnwrID7hABEH5MRF4C/iRy/Tzm4JCaCOZ+Pfew1yU8\n8jtJZNRe5aS21OoQZNC6rI968OsrW0T51zbAoMa/gW4/Bc4urlaNYeG31uxH\nj0zOf9V5Xt6ZA5pHSImcMRusJEwTmb5AKAjPR7T95683qHdP5XX1nLrne20D\nI0zV\r\n=OoP1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6icj51PElvp7AhJ2JqY185M8/CrCyUNFpewWo6Eou5gIhAKDIsBhz5uDlhJpphyhcBmR311kdVnp/FsjlxDDKfMgx"}],"size":584336,"noattachment":false,"key":"/oniguruma/-/oniguruma-7.0.1.tgz"},"maintainers":[{"email":"atom@github.com","name":"atom-team"},{"email":"ogle.ben@gmail.com","name":"benogle"},{"email":"kevinsawicki@gmail.com","name":"kevinsawicki"},{"email":"maxbrunsfeld@gmail.com","name":"maxbrunsfeld"},{"email":"nathan@github.com","name":"nathansobo"},{"email":"zcbenz@gmail.com","name":"zcbenz"},{"email":"zeke@sikelianos.com","name":"zeke"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/oniguruma_7.0.1_1532371403909_0.6155406578921305"},"_hasShrinkwrap":false,"readme":"# Oniguruma Node module\n[![CI](https://github.com/atom/node-oniguruma/actions/workflows/ci.yml/badge.svg)](https://github.com/atom/node-oniguruma/actions/workflows/ci.yml)\n\nNative Node bindings to the Oniguruma regular expressions library.\n\nRead all about Oniguruma regular expressions [here](https://github.com/kkos/oniguruma/blob/master/doc/RE).\n\nVersion 2.0 of this library added an asynchronous API, the old synchronous\nmethods have been renamed to have a `Sync` suffix.\n\n## Installing\n\n```sh\nnpm install oniguruma\n```\n\n## Building\n  * Clone the repository\n  * Run `npm install`\n  * Run `npm test` to run the specs\n\n## Using\n\n```coffeescript\n{OnigRegExp, OnigScanner} = require 'oniguruma'\n```\n\n### OnigScanner(patterns)\n\nCreate a new scanner with the given patterns.\n\n`patterns` - An array of string patterns.\n\n### OnigScanner::findNextMatch(string, startPosition, callback)\n\nFind the next match from a given position.\n\n`string` - The string to search.\n\n`startPosition` - The optional position to start at, defaults to `0`.\n\n`callback` - The `(error, match)` function to call when done, `match` will\nnull when there is no match.\n\n#### Example\n\n```coffeescript\nscanner = new OnigScanner(['c', 'a(b)?'])\nscanner.findNextMatch 'abc', (error, match) ->\n  console.log match\n  {\n    index: 1,  # Index of the best pattern match\n    captureIndices: [\n      {index: 0, start: 0, end: 2, length: 2},  # Entire match\n      {index: 1, start: 1, end: 2, length: 1}   # Match of first capture group\n    ]\n  }\n```\n\n### OnigScanner::findNextMatchSync(string, startPosition)\n\nSynchronously find the next match from a given position.\n\n`string` - The string to search.\n\n`startPosition` - The optional position to start at, defaults to `0`.\n\nReturns an object containing details about the match or `null` if no match.\n\n#### Example\n\n```coffeescript\nscanner = new OnigScanner(['c', 'a(b)?'])\nmatch = scanner.findNextMatchSync('abc')\nconsole.log match\n{\n  index: 1,  # Index of the best pattern match\n  captureIndices: [\n    {index: 0, start: 0, end: 2, length: 2},  # Entire match\n    {index: 1, start: 1, end: 2, length: 1}   # Match of first capture group\n  ]\n}\n```\n\n### OnigRegExp(pattern)\n\nCreate a new regex with the given pattern.\n\n`pattern` - A string pattern.\n\n### OnigRegExp::search(string, startPosition, callback)\n\nSearch the string for a match starting at the given position.\n\n`string` - The string to search.\n\n`startPosition` - The optional position to start the search at, defaults to `0`.\n\n`callback` - The `(error, match)` function to call when done, `match` will be\nnull if no matches were found. `match` will be an array of objects for each\nmatched group on a successful search.\n\n#### Example\n\n```coffeescript\nregex = new OnigRegExp('a([b-d])c')\nregex.search '!abcdef', (error, match) ->\n  console.log match\n  [\n    {index: 0, start: 1, end: 4, match: 'abc', length: 3}, # Entire match\n    {index: 1, start: 2, end: 3, match: 'b', length: 1}    # Match of first capture group\n  ]\n```\n\n### OnigRegExp::searchSync(string, startPosition)\n\nSynchronously search the string for a match starting at the given position.\n\n`string` - The string to search.\n\n`startPosition` - The optional position to start the search at, defaults to `0`.\n\nReturns an array of objects for each matched group or `null` if no match was\nfound.\n\n#### Example\n\n```coffeescript\nregex = new OnigRegExp('a([b-d])c')\nmatch = regex.searchSync('!abcdef')\nconsole.log match\n[\n  {index: 0, start: 1, end: 4, match: 'abc', length: 3}, # Entire match\n  {index: 1, start: 2, end: 3, match: 'b', length: 1}    # Match of first capture group\n]\n```\n\n### OnigRegExp::test(string, callback)\n\nTest if this regular expression matches the given string.\n\n`string` - The string to test against.\n\n`callback` - The `(error, matches)` function to call when done, `matches` will\nbe `true` if at least one match is found, `false` otherwise.\n\n#### Example\n\n```coffeescript\nregex = new OnigRegExp('a([b-d])c')\nregex.test 'abcdef', (error, matches) ->\n  console.log matches # true\n```\n\n### OnigRegExp::testSync(string)\n\nSynchronously test if this regular expression matches the given string.\n\n`string` - The string to test against.\n\nReturns `true` if at least one match, `false` otherwise.\n\n#### Example\n\n```coffeescript\nregex = new OnigRegExp('a([b-d])c')\nmatches = regex.testSync('abcdef')\nconsole.log matches # true\n```\n","publish_time":1532371404050,"_cnpm_publish_time":1532371404050,"dist-tags":{"latest":"7.2.3"}}