to-regex/000755 001751 000177 0000000000 14662150063014274 5ustar00runner000000 000000 1466215006314662150063to-regex/LICENSE000644 001751 000177 0000002165 14662150063015305 0ustar00runner000000 000000 1466215006314662150063 MIT License Copyright (c) Microsoft Corporation. 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 to-regex/README.md000644 001751 000177 0000004325 14662150063015560 0ustar00runner000000 000000 1466215014514662150063# Installation > `npm install --save @types/to-regex` # Summary This package contains type definitions for to-regex (https://github.com/jonschlinkert/to-regex). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/to-regex. ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/to-regex/index.d.ts) ````ts declare namespace toRegex { interface Options { /** * Generate a regex that will match any string that contains the given * pattern. By default, regex is strict will only return true for * exact matches. */ contains?: boolean; /** * Create a regex that will match everything except the given pattern. */ negate?: boolean; /** * Adds the i flag, to enable case-insensitive matching. */ nocase?: boolean; /** * Define the flags you want to use on the generated regex. */ flags?: string; /** * Generated regex is cached based on the provided string and options. * As a result, runtime compilation only happens once per pattern (as * long as options are also the same), which can result in dramatic * speed improvements. * * This also helps with debugging, since adding options and pattern * are added to the generated regex. * @default true */ cache?: boolean; /** * Check the generated regular expression with safe-regex and throw an * error if the regex is potentially unsafe. */ safe?: boolean; } /** * Create a regular expression from the given `pattern` string. */ function makeRe(pattern: string | RegExp, options?: Options): RegExp; } /** * Create a regular expression from the given `patterns` string. */ declare function toRegex(patterns: string | readonly string[] | RegExp, options?: toRegex.Options): RegExp; export = toRegex; ```` ### Additional Details * Last updated: Fri, 23 Aug 2024 18:08:51 GMT * Dependencies: none # Credits These definitions were written by [Rauli Laine](https://github.com/RauliL). to-regex/index.d.ts000644 001751 000177 0000003202 14662150063016172 0ustar00runner000000 000000 1466215006314662150063declare namespace toRegex { interface Options { /** * Generate a regex that will match any string that contains the given * pattern. By default, regex is strict will only return true for * exact matches. */ contains?: boolean; /** * Create a regex that will match everything except the given pattern. */ negate?: boolean; /** * Adds the i flag, to enable case-insensitive matching. */ nocase?: boolean; /** * Define the flags you want to use on the generated regex. */ flags?: string; /** * Generated regex is cached based on the provided string and options. * As a result, runtime compilation only happens once per pattern (as * long as options are also the same), which can result in dramatic * speed improvements. * * This also helps with debugging, since adding options and pattern * are added to the generated regex. * @default true */ cache?: boolean; /** * Check the generated regular expression with safe-regex and throw an * error if the regex is potentially unsafe. */ safe?: boolean; } /** * Create a regular expression from the given `pattern` string. */ function makeRe(pattern: string | RegExp, options?: Options): RegExp; } /** * Create a regular expression from the given `patterns` string. */ declare function toRegex(patterns: string | readonly string[] | RegExp, options?: toRegex.Options): RegExp; export = toRegex; to-regex/package.json000644 001751 000177 0000001421 14662150063016561 0ustar00runner000000 000000 1466215014514662150063{ "name": "@types/to-regex", "version": "3.0.4", "description": "TypeScript definitions for to-regex", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/to-regex", "license": "MIT", "contributors": [ { "name": "Rauli Laine", "githubUsername": "RauliL", "url": "https://github.com/RauliL" } ], "main": "", "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", "directory": "types/to-regex" }, "scripts": {}, "dependencies": {}, "typesPublisherContentHash": "b9c61cf9df2eb1fccdaa081b2a0921f291e506bc29284fd370bf4192d8336299", "typeScriptVersion": "4.8" }