{"_id":"@types/to-regex","_rev":"2804228","name":"@types/to-regex","description":"TypeScript definitions for to-regex","dist-tags":{"latest":"3.0.0","ts3.7":"3.0.0","ts3.8":"3.0.0","ts3.9":"3.0.0","ts4.0":"3.0.0","ts4.1":"3.0.0","ts4.2":"3.0.0","ts4.3":"3.0.0","ts4.4":"3.0.0","ts4.5":"3.0.0","ts4.6":"3.0.0","ts4.7":"3.0.0","ts4.8":"3.0.0","ts4.9":"3.0.0"},"maintainers":[{"name":"types","email":""}],"time":{"modified":"2022-09-01T09:22:42.000Z","created":"2021-10-21T23:32:12.230Z","3.0.0":"2021-10-21T23:32:12.230Z"},"users":{},"repository":{"type":"git","url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git","directory":"types/to-regex"},"versions":{"3.0.0":{"name":"@types/to-regex","version":"3.0.0","description":"TypeScript definitions for to-regex","homepage":"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/to-regex","license":"MIT","contributors":[{"name":"Rauli Laine","url":"https://github.com/RauliL","githubUsername":"RauliL"},{"name":"Anatoly Pitikin","url":"https://github.com/xapdkop","githubUsername":"xapdkop"}],"main":"","types":"index.d.ts","repository":{"type":"git","url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git","directory":"types/to-regex"},"scripts":{},"dependencies":{},"typesPublisherContentHash":"0e8a68bf71870d5e64cebea8b0563e82a8f18ba05df4dcdf6a8c3374ad743b1e","typeScriptVersion":"3.7","_id":"@types/to-regex@3.0.0","dist":{"shasum":"aecefb9b8b727d5b16bf8a6d49d3b9cbd5162060","size":2174,"noattachment":false,"key":"/@types/to-regex/-/@types/to-regex-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@types/to-regex/download/@types/to-regex-3.0.0.tgz"},"_npmUser":{"name":"types","email":"ts-npm-types@microsoft.com"},"directories":{},"maintainers":[{"name":"types","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/to-regex_3.0.0_1634859132089_0.3678303864507071"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-20T07:31:09.780Z","publish_time":1634859132230,"_cnpm_publish_time":1634859132230}},"readme":"# Installation\r\n> `npm install --save @types/to-regex`\r\n\r\n# Summary\r\nThis package contains type definitions for to-regex (https://github.com/jonschlinkert/to-regex).\r\n\r\n# Details\r\nFiles were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/to-regex.\r\n## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/to-regex/index.d.ts)\r\n````ts\r\n// Type definitions for to-regex 3.0\n// Project: https://github.com/jonschlinkert/to-regex\n// Definitions by: Rauli Laine <https://github.com/RauliL>\n//                 Anatoly Pitikin <https://github.com/xapdkop>\n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n\ndeclare namespace toRegex {\n    interface Options {\n        /**\n         * Generate a regex that will match any string that contains the given\n         * pattern. By default, regex is strict will only return true for\n         * exact matches.\n         */\n        contains?: boolean;\n\n        /**\n         * Create a regex that will match everything except the given pattern.\n         */\n        negate?: boolean;\n\n        /**\n         * Adds the i flag, to enable case-insensitive matching.\n         */\n        nocase?: boolean;\n\n        /**\n         * Define the flags you want to use on the generated regex.\n         */\n        flags?: string;\n\n        /**\n         * Generated regex is cached based on the provided string and options.\n         * As a result, runtime compilation only happens once per pattern (as\n         * long as options are also the same), which can result in dramatic\n         * speed improvements.\n         *\n         * This also helps with debugging, since adding options and pattern\n         * are added to the generated regex.\n         * @default true\n         */\n        cache?: boolean;\n\n        /**\n         * Check the generated regular expression with safe-regex and throw an\n         * error if the regex is potentially unsafe.\n         */\n        safe?: boolean;\n    }\n\n    /**\n     * Create a regular expression from the given `pattern` string.\n     */\n    function makeRe(pattern: string | RegExp, options?: Options): RegExp;\n}\n\n/**\n * Create a regular expression from the given `patterns` string.\n */\ndeclare function toRegex(patterns: string | ReadonlyArray<string> | RegExp, options?: toRegex.Options): RegExp;\n\nexport = toRegex;\n\r\n````\r\n\r\n### Additional Details\r\n * Last updated: Thu, 21 Oct 2021 23:32:00 GMT\r\n * Dependencies: none\r\n * Global values: none\r\n\r\n# Credits\r\nThese definitions were written by [Rauli Laine](https://github.com/RauliL), and [Anatoly Pitikin](https://github.com/xapdkop).\r\n","_attachments":{},"homepage":"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/to-regex","license":"MIT"}