{"_id":"@bluelovers/extract-brackets","_rev":"1-9b77604a3df9014b3b433e2652905b40","name":"@bluelovers/extract-brackets","dist-tags":{"latest":"0.0.9"},"versions":{"0.0.8":{"name":"@bluelovers/extract-brackets","version":"0.0.8","keywords":["extract","brackets","parenthesis","nested","from","string","strings","create-by-yarn-tool","create-by-tsdx"],"author":{"url":"http://ninni.io","name":"Brian Ninni","email":"brian@ninni.io"},"license":"MIT","_id":"@bluelovers/extract-brackets@0.0.8","maintainers":[{"name":"bluelovers","email":"codelovers@users.sourceforge.net"}],"dist":{"shasum":"aa1a703feb28e5e4201a75f46bd15dc9c66d9dd6","tarball":"https://registry.npmjs.org/@bluelovers/extract-brackets/-/extract-brackets-0.0.8.tgz","fileCount":19,"integrity":"sha512-PdKAuZd1giulHE66EL/uZzVPaZJ2SrDKtlP3l0wTYBC4Y/1QxrMZWzxLwx3vljMnOsKQHF1kai57Vt3v5TOo7Q==","signatures":[{"sig":"MEQCIFiga/YukMPf2euIbV/TRYH2n2atDRASnMVjLOiqvZcRAiBBE0pSICgg+25iED3rnNzTi96X4qnaQIA8YB8mg6Mtng==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":165863},"main":"dist/index.cjs","types":"dist/index.d.ts","unpkg":"dist/index.umd.production.min.cjs","module":"dist/index.esm.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.mjs","require":"./dist/index.cjs"},"./src/*":"./src/*","./package.json":"./package.json"},"gitHead":"dd79f1ea57c086118945810c8f772ee9f23cb288","scripts":{"ncu":"yarn-tool ncu -u","lint":"yarn run lint:eslint","pack":"echo pack","test":"yarn run test:jest","build":"yarn run build:tsdx && yarn run build:dts:bundle","review":"yarn run review:coverage","prepack":"echo prepack","prepare":"echo prepare","pretest":"echo pretest","publish":"echo publish","tsc:esm":"tsc -p tsconfig.esm.json","version":"echo version","ci:build":"echo ci:build","coverage":"yarn run test -- --coverage","postpack":"echo postpack","posttest":"yarn run build","test:tsd":"ynpx tsd","test:jest":"jest --passWithNoTests","test:tsdx":"ynpx @bluelovers/tsdx test --passWithNoTests","build:tsdx":"ynpx @bluelovers/tsdx build --target node --name index","ci:install":"yarn install --frozen-lockfile && yarn add -W yarn-tool lerna@6 ynpx ts-node ts-jest jest typescript@next @bluelovers/jest-config tsx","prepublish":"echo prepublish","preversion":"echo preversion && yarn run test","test:mocha":"ynpx --quiet -p ts-node -p mocha mocha -- --require ts-node/register \"!(node_modules)/**/*.{test,spec}.{ts,tsx}\"","ws:fix-all":"yarn-tool fix-all  --overwriteHostedGitInfo","lint:eslint":"ynpx eslint --ext .ts,.tsx,.mts,.cts ./","npm:publish":"npm publish","postpublish":"yarn run postpublish:changelog && yarn run postpublish:git:commit && yarn run postpublish:git:tag && yarn run postpublish:git:push","postversion":"echo postversion","review:test":"yarn run lint && yarn run test","tsc:default":"tsc -p tsconfig.json","version:bump":"yarn-tool version","build:dts:tsc":"yarn run build:dts:tsc:emit && yarn run build:dts:copy","test:snapshot":"yarn run test -- -u","build:dts:copy":"copy .\\src\\index.d.ts .\\dist\\index.d.ts & echo build:dts","prepublishOnly":"yarn run preversion","tsc:showConfig":"ynpx get-current-tsconfig -p","postpublishOnly":"echo postpublishOnly","review:coverage":"yarn run lint && yarn run coverage","build:dts:bundle":"ynpx @bluelovers/dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner --inline-declare-global & echo build:dts:bundle","npm:publish:bump":"yarn run version:bump && npm publish","build:microbundle":"ynpx microbundle --target node","sort-package-json":"yarn-tool sort","build:dts:tsc:emit":"tsc --emitDeclarationOnly --declaration --noEmit false","test:jest:coverage":"yarn run test:jest -- --coverage","test:jest:snapshot":"yarn run test:jest -- -u","version:bump:major":"yarn run version:bump -- --bump major","version:bump:minor":"yarn run version:bump -- --bump minor","version:bump:patch":"yarn run version:bump -- --bump patch","postpublish:git:tag":"ynpx --quiet @yarn-tool/tag","postpublish:git:push":"git push --follow-tags","test:jest:clearCache":"jest --clearCache","install:resetLockfile":"yarn-tool install --reset-lockfile","postpublish:changelog":"ynpx --quiet @yarn-tool/changelog && git add ./CHANGELOG.md","install:frozenLockfile":"yarn-tool install --frozen-lockfile","npm:publish:bump:major":"yarn run version:bump:major && npm publish","npm:publish:bump:minor":"yarn run version:bump:minor && npm publish","npm:publish:bump:patch":"yarn run version:bump:patch && npm publish","postpublish:git:commit":"git commit -m \"chore(release): publish\" . & echo postpublish:git:commit","version:bump:prerelease":"yarn run version:bump -- --bump prerelease","prepublishOnly:check-bin":"ynpx --quiet @yarn-tool/check-pkg-bin","npm:publish:bump:prerelease":"yarn run version:bump:prerelease && npm publish","ws:fix-all:resetStaticFiles":"yarn run ws:fix-all -- --resetStaticFiles"},"typings":"dist/index.d.ts","_npmUser":{"name":"bluelovers","email":"codelovers@users.sourceforge.net"},"_npmVersion":"10.9.0","description":"Extract nested brackets from strings","directories":{"test":"test"},"sideEffects":false,"_nodeVersion":"23.1.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@1.22.19","devDependencies":{"tslib":">=2.8.1","@types/node":"^22.13.1","@bluelovers/tsconfig":"^1.0.35"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/extract-brackets_0.0.8_1739145247630_0.375464590663549","host":"s3://npm-registry-packages-npm-production"}},"0.0.9":{"name":"@bluelovers/extract-brackets","version":"0.0.9","description":"Extract nested brackets from strings","keywords":["extract","brackets","parenthesis","nested","from","string","strings","create-by-yarn-tool","create-by-tsdx"],"homepage":"https://github.com/bluelovers/extract-brackets#readme","bugs":{"url":"https://github.com/bluelovers/extract-brackets/issues"},"repository":{"type":"git","url":"git+https://github.com/bluelovers/extract-brackets.git"},"license":"MIT","author":{"name":"Brian Ninni","email":"brian@ninni.io","url":"http://ninni.io"},"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.esm.mjs"},"./package.json":"./package.json","./src/*":"./src/*"},"main":"dist/index.cjs","unpkg":"dist/index.umd.production.min.cjs","module":"dist/index.esm.mjs","types":"dist/index.d.ts","typings":"dist/index.d.ts","directories":{"test":"test"},"scripts":{"review":"yarn run review:coverage","review:coverage":"yarn run lint && yarn run coverage","review:test":"yarn run lint && yarn run test","coverage":"yarn run test -- --coverage","lint":"yarn run lint:eslint","lint:eslint":"ynpx eslint --ext .ts,.tsx,.mts,.cts ./","pretest":"echo pretest","test":"yarn run test:jest","test:jest":"jest --passWithNoTests","test:jest:clearCache":"jest --clearCache","test:jest:coverage":"yarn run test:jest -- --coverage","test:jest:snapshot":"yarn run test:jest -- -u","test:mocha":"ynpx --quiet -p ts-node -p mocha mocha -- --require ts-node/register \"!(node_modules)/**/*.{test,spec}.{ts,tsx}\"","test:snapshot":"yarn run test -- -u","test:tsd":"ynpx tsd","test:tsdx":"ynpx @bluelovers/tsdx test --passWithNoTests","posttest":"yarn run build","install:frozenLockfile":"yarn-tool install --frozen-lockfile","install:resetLockfile":"yarn-tool install --reset-lockfile","build":"yarn run build:tsdx && yarn run build:dts:bundle","build:dts:bundle":"ynpx @bluelovers/dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner --inline-declare-global & echo build:dts:bundle","build:dts:copy":"copy .\\src\\index.d.ts .\\dist\\index.d.ts & echo build:dts","build:dts:tsc":"yarn run build:dts:tsc:emit && yarn run build:dts:copy","build:dts:tsc:emit":"tsc --emitDeclarationOnly --declaration --noEmit false","build:microbundle":"ynpx microbundle --target node","build:tsdx":"ynpx @bluelovers/tsdx build --target node --name index","ci:install":"yarn install --frozen-lockfile && yarn add -W yarn-tool lerna@6 ynpx ts-node ts-jest jest typescript@next @bluelovers/jest-config tsx","ci:build":"echo ci:build","npm:publish":"npm publish","npm:publish:bump":"yarn run version:bump && npm publish","npm:publish:bump:major":"yarn run version:bump:major && npm publish","npm:publish:bump:minor":"yarn run version:bump:minor && npm publish","npm:publish:bump:patch":"yarn run version:bump:patch && npm publish","npm:publish:bump:prerelease":"yarn run version:bump:prerelease && npm publish","ws:fix-all":"yarn-tool fix-all  --overwriteHostedGitInfo","ws:fix-all:resetStaticFiles":"yarn run ws:fix-all -- --resetStaticFiles","preversion":"echo preversion && yarn run test","version":"echo version","version:bump":"yarn-tool version","version:bump:major":"yarn run version:bump -- --bump major","version:bump:minor":"yarn run version:bump -- --bump minor","version:bump:patch":"yarn run version:bump -- --bump patch","version:bump:prerelease":"yarn run version:bump -- --bump prerelease","postversion":"echo postversion","prepublish":"echo prepublish","prepare":"echo prepare","prepublishOnly":"yarn run preversion","prepublishOnly:check-bin":"ynpx --quiet @yarn-tool/check-pkg-bin","prepack":"echo prepack","pack":"echo pack","postpack":"echo postpack","publish":"echo publish","postpublish":"yarn run postpublish:changelog && yarn run postpublish:git:commit && yarn run postpublish:git:tag && yarn run postpublish:git:push","postpublish:changelog":"ynpx --quiet @yarn-tool/changelog && git add ./CHANGELOG.md","postpublish:git:commit":"git commit -m \"chore(release): publish\" . & echo postpublish:git:commit","postpublish:git:push":"git push --follow-tags","postpublish:git:tag":"ynpx --quiet @yarn-tool/tag","postpublishOnly":"echo postpublishOnly","ncu":"yarn-tool ncu -u","sort-package-json":"yarn-tool sort","tsc:default":"tsc -p tsconfig.json","tsc:esm":"tsc -p tsconfig.esm.json","tsc:showConfig":"ynpx get-current-tsconfig -p"},"dependencies":{},"devDependencies":{"@bluelovers/tsconfig":"^1.0.35","@types/node":"^22.13.1","tslib":">=2.8.1"},"peerDependencies":{},"packageManager":"yarn@1.22.19","publishConfig":{"access":"public"},"_id":"@bluelovers/extract-brackets@0.0.9","gitHead":"85219ccb6402206c3d5fc761aa686a24b3bb7653","_nodeVersion":"23.1.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-efiIHz6jYdvsbE2eRGt71sEuDUXTHFiFvMNARflXJ+CadQhjxmgkqyQLhWRUtRVQgOHHlOPbGFpqwhXS6JgWWg==","shasum":"1ac9defe18ea492c12ba196e8beb68dfdb30823c","tarball":"https://registry.npmjs.org/@bluelovers/extract-brackets/-/extract-brackets-0.0.9.tgz","fileCount":20,"unpackedSize":167412,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHiwAC/6Lmig87B+7LAx8cKaIDL5axZ+XB+Gb/Um9Z6eAiEAgBMqWtkF0itR1KesEZRaNM2Oyp/6aoCtigxmjuAObAI="}]},"_npmUser":{"name":"bluelovers","email":"codelovers@users.sourceforge.net"},"maintainers":[{"name":"bluelovers","email":"codelovers@users.sourceforge.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/extract-brackets_0.0.9_1739150920163_0.19267051917883515"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-09T23:54:07.518Z","modified":"2025-02-10T01:28:40.559Z","0.0.8":"2025-02-09T23:54:07.790Z","0.0.9":"2025-02-10T01:28:40.382Z"},"author":{"name":"Brian Ninni","email":"brian@ninni.io","url":"http://ninni.io"},"license":"MIT","keywords":["extract","brackets","parenthesis","nested","from","string","strings","create-by-yarn-tool","create-by-tsdx"],"description":"Extract nested brackets from strings","maintainers":[{"name":"bluelovers","email":"codelovers@users.sourceforge.net"}],"readme":"#extract-brackets\n\nTo extract nested brackets from strings.\n\nIt will detect all brackets inside the string, and return the data from each bracket in a nested format.\n\nFor example:\n\nParsing:\n\n```javascript\n'outer( inner )'\n```\n\nwill return\n\n```javascript\n' inner '\n```\n\nAnd parsing:\n\n```javascript\n'outer( inner( innest ) )'\n```\n\nwill return:\n\n```javascript\n' inner( innest ) ' and ' innest '\n```\n\nIt also works with escaped characters and characters that exist inside strings:\n\nParsing:\n\n```javascript\n'outer( \"inner( innest )\" )'\n```\n\nwill return\n\n```javascript\n' \"inner( innest )\" '\n```\n\nand parsing:\n\n```javascript\n'outer( inner\\( innest ) )'\n```\n\nwill return\n\n```javascript\n' \"inner\\( innest )\" '\n```\n\nTo use:\n\n```javascript\nvar Extractor = require('extract-brackets')\n```\n\nYou can define the `open` str, the `close` str, and the `string escape` strs\n\nIf a `close` char is not provided, it will default to the matching pair from the a list, or it will be the `open` string\nin reverse.\n\nIf a `string escape` list is not provided, it will default to a common list.\n\nReturns an array of **match objects**\n\nA **match object** has three properties:\n\n* `str` - The entire string inside the brackets\n* `hasNest` - If a nested bracket was found\n* `nest` - Array where each element is either a plain string or a nested **match object**\n\nTo extract parenthesis:\n\n```javascript\nvar ExtractParens = new Extractor( '(' );\n\n//the 'close' char defaults to ')'\n\nExtractParents.extract('outer( inner( innest ) )')\n```\n\nwill return:\n\n```javascript\n\n[{\n  hasNest : true,\n  str : ' inner( innest ) '\n  nest : [\n    ' inner',\n    {\n      str : ' innest ',\n      hasNest : false,\n      nest : [' innest ']\n    },\n    ' '\n  ]\n}\n```\n","readmeFilename":"README.md","homepage":"https://github.com/bluelovers/extract-brackets#readme","repository":{"type":"git","url":"git+https://github.com/bluelovers/extract-brackets.git"},"bugs":{"url":"https://github.com/bluelovers/extract-brackets/issues"}}