{"main":"./src/oniguruma.js","name":"oniguruma","description":"oniguruma regular expression library","version":"7.2.3","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":"~2.6.2","jasmine-focused":"~1.0.7"},"dependencies":{"nan":"^2.14.0"},"scripts":{"test":"jasmine-focused --captureExceptions spec/","benchmark":"benchmark/benchmark.coffee","install":"node-gyp rebuild"},"gypfile":true,"gitHead":"7f1648410b295abc172f3961da40778a91e33ec1","_id":"oniguruma@7.2.3","_nodeVersion":"12.18.3","_npmVersion":"7.18.1","dist":{"integrity":"sha512-PZZcE0yfg8Q1IvaJImh21RUTHl8ep0zwwyoE912KqlWVrsGByjjj29sdACcD1BFyX2bLkfuOJeP+POzAGVWtbA==","shasum":"e0b0b415302de8cdd6564e57a1a822ac0ab57012","tarball":"http://registry-npm.ywwl.com/oniguruma/download/oniguruma-7.2.3.tgz","fileCount":123,"unpackedSize":2747243,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg30r4CRA9TVsSAnZWagAAQsYP/2GPN8S5zb2S0ihSHOqa\nNrsScrrT8VRbdMYpM/R2IpBCBHc8V8LWRnH40m6eTLfYr7s1hSIQHl3m/+Za\n46z97DRrMmvIt8lXbNthnCRj//8ShBCAindTHIdhyzuOh7e19BciPShqb+oI\noQ0Kj9t58WAvxAZpng96cUybzI8bBVYnLxVW878jGaeBnrBhneT4N+sTqN0X\noosm6u5uEiCnuNDZqb2pmPdeOjq2GV4HcGoMOEZOmZldnGvZV7oLlYhU3yvI\neenoIUQ2gBjNxbfG3+U8gmqC/R+Rc0I769Er3PfwpEcvYEAR7JFZVCZ0hNrV\n7zh41yuRVItGD73Q5/XOZedb4dlGlySZMWXgbawazFNYBrnIbJXhD7FXRwqk\nndvqT+3Vwkte/SntWQaHoepleVshtbq3eSwAf6gs3LS7HlX21n1kf5lgUvfk\nhlYEzp887+/cL73jHZfOtLQ0l4bp3o73Cee9s/Cf/MFoYd4UDoW/0bjHdPtB\nDFo4zVlsC0Q2SgMLRHFENtZlIzkb7qaOIEV5bui1gjVabPL1Cy5hM0FsRzDr\ndyB2fnW7OZl2sjMNgkjyFF4Bdc2pcVq3llDT92enAIv8JuncKtD9Tp/AtO8a\n/p9OY50a9buscaWl61crV2ZkS5n3fBF2g/BvyzrjQhivpFK5LweptxT1SDQq\nCvkA\r\n=tunz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFR7nRRIvsZdySfTHuRN19WcCZNJlg2kBfhcTJsKBXSnAiEA7OQlPvbp1JoE0pDA92zhwlT2jOzsKPqmjH2oGgG6Vbw="}],"size":586673,"noattachment":false,"key":"/oniguruma/-/oniguruma-7.2.3.tgz"},"_npmUser":{"name":"atom-team","email":"atom@github.com"},"directories":{},"maintainers":[{"name":"benogle","email":"ogle.ben@gmail.com"},{"name":"nathansobo","email":"nathan@github.com"},{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"},{"name":"maxbrunsfeld","email":"maxbrunsfeld@gmail.com"},{"name":"zcbenz","email":"zcbenz@gmail.com"},{"name":"zeke","email":"zeke@sikelianos.com"},{"name":"atom-team","email":"atom@github.com"},{"name":"kashef","email":"mazen.elkashef@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/oniguruma_7.2.3_1625246455920_0.3766475273852099"},"_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":1625246456161,"_cnpm_publish_time":1625246456161,"dist-tags":{"latest":"7.2.3"}}