outline.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky pad-start-end.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky page-transition-events.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky pagevisibility.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky passive-event-listener.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky passwordrules.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky path2d.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky payment-request.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky pdf-viewer.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky permissions-api.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky permissions-policy.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky picture-in-picture.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky picture.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky ping.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky png-alpha.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky pointer-events.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky pointer.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky pointerlock.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky portals.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky prefers-color-scheme.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky prefers-reduced-motion.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky progress.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky promise-finally.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky promises.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky proximity.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky proxy.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky publickeypinning.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky push-api.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky queryselector.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky readonly-attr.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky referrer-policy.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky registerprotocolhandler.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky rel-noopener.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky rel-noreferrer.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky rellist.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky rem.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky requestanimationframe.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky requestidlecallback.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky resizeobserver.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky resource-timing.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky rest-parameters.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky rtcpeerconnection.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky ruby.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky run-in.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky same-site-cookie-attribute.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky screen-orientation.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky script-async.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky script-defer.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky scrollintoview.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky scrollintoviewifneeded.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky sdch.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky selection-api.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky server-timing.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky serviceworkers.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky setimmediate.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky shadowdom.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky shadowdomv1.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky sharedarraybuffer.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky sharedworkers.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky sni.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky spdy.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky speech-recognition.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky speech-synthesis.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky spellcheck-attribute.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky sql-storage.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky srcset.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky stream.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky streams.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky stricttransportsecurity.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky style-scoped.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky subresource-bundling.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky subresource-integrity.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky svg-css.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky svg-filters.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky svg-fonts.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky svg-fragment.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky svg-html.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky svg-html5.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky svg-img.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky svg-smil.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky svg.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky sxg.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky tabindex-attr.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky template-literals.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky template.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky temporal.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky testfeat.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky text-decoration.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky text-emphasis.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky text-overflow.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky text-size-adjust.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky text-stroke.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky textcontent.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky textencoder.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky tls1-1.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky tls1-2.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky tls1-3.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky touch.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky transforms2d.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky transforms3d.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky trusted-types.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky ttf.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky typedarrays.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky u2f.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky unhandledrejection.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky upgradeinsecurerequests.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky url-scroll-to-text-fragment.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky url.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky urlsearchparams.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky use-strict.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky user-select-none.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky user-timing.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky variable-fonts.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky vector-effect.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky vibration.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky video.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky videotracks.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky viewport-unit-variants.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky viewport-units.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky wai-aria.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky wake-lock.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky wasm.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky wav.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky wbr-element.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky web-animation.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky web-app-manifest.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky web-bluetooth.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky web-serial.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky web-share.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky webauthn.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky webcodecs.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky webgl.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky webgl2.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky webgpu.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky webhid.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky webkit-user-drag.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky webm.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky webnfc.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky webp.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky websockets.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky webtransport.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky webusb.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky webvr.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky webvtt.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky webworkers.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky webxr.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky will-change.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky woff.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky woff2.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky word-break.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky wordwrap.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky x-doc-messaging.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky x-frame-options.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky xhr2.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky xhtml.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky xhtmlsmil.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky xml-serializer.js 77628cf8bf first comm %!s(int64=3) %!d(string=před) roky tmt/tiger_frontend - Gogs: Simplico Git Service

説明なし

golf 77628cf8bf first comm 3 年 前
..
.github 77628cf8bf first comm 3 年 前
LICENSE.md 77628cf8bf first comm 3 年 前
README.md 77628cf8bf first comm 3 年 前
index.js 77628cf8bf first comm 3 年 前
package.json 77628cf8bf first comm 3 年 前

README.md

balanced-match

Match balanced string pairs, like { and } or <b> and </b>. Supports regular expressions as well!

build status downloads

testling badge

Example

Get the first matching pair of braces:

var balanced = require('balanced-match');

console.log(balanced('{', '}', 'pre{in{nested}}post'));
console.log(balanced('{', '}', 'pre{first}between{second}post'));
console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre  {   in{nest}   }  post'));

The matches are:

$ node example.js
{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
{ start: 3,
  end: 9,
  pre: 'pre',
  body: 'first',
  post: 'between{second}post' }
{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }

API

var m = balanced(a, b, str)

For the first non-nested matching pair of a and b in str, return an object with those keys:

  • start the index of the first match of a
  • end the index of the matching b
  • pre the preamble, a and b not included
  • body the match, a and b not included
  • post the postscript, a and b not included

If there's no match, undefined will be returned.

If the str contains more a than b / there are unmatched pairs, the first match that was closed will be used. For example, {{a} will match ['{', 'a', ''] and {a}} will match ['', 'a', '}'].

var r = balanced.range(a, b, str)

For the first non-nested matching pair of a and b in str, return an array with indexes: [ <a index>, <b index> ].

If there's no match, undefined will be returned.

If the str contains more a than b / there are unmatched pairs, the first match that was closed will be used. For example, {{a} will match [ 1, 3 ] and {a}} will match [0, 2].

Installation

With npm do:

npm install balanced-match

Security contact information

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

License

(MIT)

Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.