Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/balanced-match

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/balanced-match - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

26

balanced-match/index.d.ts
// Type definitions for balanced-match 1.0
// Project: https://github.com/juliangruber/balanced-match
// Definitions by: Adam Zerella <https://github.com/adamzerella>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

@@ -29,8 +30,25 @@

declare class Balanced {
balanced(a: string|RegExp, b: string|RegExp, str: string): Output|void;
/**
*
* 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
* `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', '}']`
*/
declare function balanced(a: string | RegExp, b: string | RegExp, str: string): Output | void;
range(a: string|RegExp, b: string|RegExp, str: string): Output|void;
declare namespace balanced {
/**
* For the first non-nested matching pair of `a` and `b` in `str`,
* return an array with indexes: `[ <a index>, <b index> ]`.
*/
function range(a: string | RegExp, b: string | RegExp, str: string): Output | void;
}
export = Balanced;
export = balanced;

13

balanced-match/package.json
{
"name": "@types/balanced-match",
"version": "1.0.0",
"version": "1.0.1",
"description": "TypeScript definitions for balanced-match",

@@ -11,6 +11,11 @@ "license": "MIT",

"githubUsername": "adamzerella"
},
{
"name": "Piotr Błażejewicz",
"url": "https://github.com/peterblazejewicz",
"githubUsername": "peterblazejewicz"
}
],
"main": "",
"types": "index",
"types": "index.d.ts",
"repository": {

@@ -23,4 +28,4 @@ "type": "git",

"dependencies": {},
"typesPublisherContentHash": "ff17190bccf798ee552817a559b45a8abde2ad9733fadfcf8529aaf4a3414cd7",
"typeScriptVersion": "2.0"
"typesPublisherContentHash": "8c79df9ffa20be57de51f7269fc6fbc86aad11a786d8af5a02013dce660e1a5c",
"typeScriptVersion": "2.8"
}

@@ -5,9 +5,9 @@ # Installation

# Summary
This package contains type definitions for balanced-match ( https://github.com/juliangruber/balanced-match ).
This package contains type definitions for balanced-match (https://github.com/juliangruber/balanced-match).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/balanced-match
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/balanced-match.
Additional Details
* Last updated: Mon, 29 Apr 2019 07:00:00 GMT
### Additional Details
* Last updated: Fri, 31 Jan 2020 22:40:42 GMT
* Dependencies: none

@@ -17,2 +17,2 @@ * Global values: none

# Credits
These definitions were written by Adam Zerella <https://github.com/adamzerella>.
These definitions were written by Adam Zerella (https://github.com/adamzerella), and Piotr Błażejewicz (https://github.com/peterblazejewicz).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc