|
163 | 163 | ],
|
164 | 164 | "signature": "let import: 'a => promise<'a>"
|
165 | 165 | },
|
166 |
| - { |
167 |
| - "id": "Core.t", |
168 |
| - "kind": "type", |
169 |
| - "name": "t", |
170 |
| - "docstrings": [], |
171 |
| - "signature": "type t<'a> = Js.t<'a>\n constraint 'a = {..}" |
172 |
| - }, |
173 | 166 | {
|
174 | 167 | "id": "Core.null",
|
175 | 168 | "kind": "type",
|
|
242 | 235 | }
|
243 | 236 | ]
|
244 | 237 | },
|
245 |
| - "core/re/result": { |
246 |
| - "id": "Core.Re.Result", |
247 |
| - "name": "Result", |
248 |
| - "docstrings": [], |
249 |
| - "items": [ |
250 |
| - { |
251 |
| - "id": "Core.Re.Result.t", |
252 |
| - "kind": "type", |
253 |
| - "name": "t", |
254 |
| - "docstrings": [ |
255 |
| - "Type representing the result of a `RegExp` execution." |
256 |
| - ], |
257 |
| - "signature": "type t = array<option<string>>" |
258 |
| - }, |
259 |
| - { |
260 |
| - "id": "Core.Re.Result.fullMatch", |
261 |
| - "kind": "value", |
262 |
| - "name": "fullMatch", |
263 |
| - "docstrings": [ |
264 |
| - "`fullMatch(regExpResult)` returns the full string that matched in this result.\n\n ## Examples\n ```rescript\n // Match the first two words separated by a space\n let regexp = RegExp.fromString(\"(\\\\w+) (\\\\w+)\")\n\n switch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n | None => Console.log(\"Nope, no match...\")\n | Some(result) => Console.log(result->RegExp.Result.fullMatch) // Prints the full string that matched, \"ReScript is\"\n }\n ```" |
265 |
| - ], |
266 |
| - "signature": "let fullMatch: t => string" |
267 |
| - }, |
268 |
| - { |
269 |
| - "id": "Core.Re.Result.matches", |
270 |
| - "kind": "value", |
271 |
| - "name": "matches", |
272 |
| - "docstrings": [ |
273 |
| - "`matches(regExpResult)` returns all matches for `regExpResult`.\n\n ## Examples\n ```rescript\n // Match the first two words separated by a space\n let regexp = RegExp.fromString(\"(\\\\w+) (\\\\w+)\")\n\n // This below will log \"ReScript\" and \"is\" to the console.\n switch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n | None => Console.log(\"Nope, no match...\")\n | Some(result) => switch result->RegExp.Result.matches {\n | [firstWord, secondWord] => Console.log2(firstWord, secondWord)\n | _ => Console.log(\"Didn't find exactly two words...\")\n }\n }\n ```" |
274 |
| - ], |
275 |
| - "signature": "let matches: t => array<string>" |
276 |
| - }, |
277 |
| - { |
278 |
| - "id": "Core.Re.Result.index", |
279 |
| - "kind": "value", |
280 |
| - "name": "index", |
281 |
| - "docstrings": [], |
282 |
| - "signature": "let index: t => int" |
283 |
| - }, |
284 |
| - { |
285 |
| - "id": "Core.Re.Result.input", |
286 |
| - "kind": "value", |
287 |
| - "name": "input", |
288 |
| - "docstrings": [ |
289 |
| - "`input(regExpResult)` returns the full input string that was passed to what produced the `RegExp.Result.t`.\n\n ## Examples\n ```rescript\n // Match the first two words separated by a space\n let regexp = RegExp.fromString(\"(\\\\w+) (\\\\w+)\")\n\n // This below will log the full input string \"ReScript is pretty cool, right?\" to the console.\n switch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n | None => Console.log(\"Nope, no match...\")\n | Some(result) => Console.log(result->RegExp.Result.input)\n }\n ```" |
290 |
| - ], |
291 |
| - "signature": "let input: t => string" |
292 |
| - } |
293 |
| - ] |
294 |
| - }, |
295 | 238 | "core/intl/segments": {
|
296 | 239 | "id": "Core.Intl.Segments",
|
297 | 240 | "name": "Segments",
|
|
3124 | 3067 | "docstrings": [],
|
3125 | 3068 | "items": []
|
3126 | 3069 | },
|
3127 |
| - "core/re": { |
3128 |
| - "id": "Core.Re", |
3129 |
| - "name": "Re", |
3130 |
| - "docstrings": [ |
3131 |
| - "Functions for handling RegExp's in ReScript.\n\nSee [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) on MDN." |
3132 |
| - ], |
3133 |
| - "items": [ |
3134 |
| - { |
3135 |
| - "id": "Core.Re.t", |
3136 |
| - "kind": "type", |
3137 |
| - "name": "t", |
3138 |
| - "docstrings": [ |
3139 |
| - "Type representing an instantiated `RegExp`." |
3140 |
| - ], |
3141 |
| - "signature": "type t = Js.Re.t" |
3142 |
| - }, |
3143 |
| - { |
3144 |
| - "id": "Core.Re.fromString", |
3145 |
| - "kind": "value", |
3146 |
| - "name": "fromString", |
3147 |
| - "docstrings": [ |
3148 |
| - "`fromString(string)` creates a `RegExp.t` from the provided string. This can then be used to match on strings using `RegExp.exec`.\n\nSee [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\n\nswitch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n| None => Console.log(\"Nope, no match...\")\n| Some(result) => Console.log(result->RegExp.Result.fullMatch) // Prints \"ReScript\"\n}\n```" |
3149 |
| - ], |
3150 |
| - "signature": "let fromString: string => t" |
3151 |
| - }, |
3152 |
| - { |
3153 |
| - "id": "Core.Re.fromStringWithFlags", |
3154 |
| - "kind": "value", |
3155 |
| - "name": "fromStringWithFlags", |
3156 |
| - "docstrings": [ |
3157 |
| - "`fromStringWithFlags(string)` creates a `RegExp.t` from the provided string, using the provided `flags`. This can then be used to match on strings using `RegExp.exec`.\n\nSee [`RegExp parameters`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp#parameters) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\n\nswitch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n| None => Console.log(\"Nope, no match...\")\n| Some(result) => Console.log(result->RegExp.Result.fullMatch) // Prints \"ReScript\"\n}\n```" |
3158 |
| - ], |
3159 |
| - "signature": "let fromStringWithFlags: (string, ~flags: string) => t" |
3160 |
| - }, |
3161 |
| - { |
3162 |
| - "id": "Core.Re.test", |
3163 |
| - "kind": "value", |
3164 |
| - "name": "test", |
3165 |
| - "docstrings": [ |
3166 |
| - "`test(regexp, string)` tests whether the provided `regexp` matches on the provided string.\n\nSee [`RegExp.test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\n\nif regexp->RegExp.test(\"ReScript is cool!\") {\n Console.log(\"Yay, there's a word in there.\")\n}\n```" |
3167 |
| - ], |
3168 |
| - "signature": "let test: (t, string) => bool" |
3169 |
| - }, |
3170 |
| - { |
3171 |
| - "id": "Core.Re.exec", |
3172 |
| - "kind": "value", |
3173 |
| - "name": "exec", |
3174 |
| - "docstrings": [ |
3175 |
| - "`exec(regexp, string)` executes the provided regexp on the provided string, optionally returning a `RegExp.Result.t` if the regexp matches on the string.\n\nSee [`RegExp.exec`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\n\nswitch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n| None => Console.log(\"Nope, no match...\")\n| Some(result) => Console.log(result->RegExp.Result.fullMatch) // Prints \"ReScript\"\n}\n```" |
3176 |
| - ], |
3177 |
| - "signature": "let exec: (t, string) => option<Result.t>" |
3178 |
| - }, |
3179 |
| - { |
3180 |
| - "id": "Core.Re.lastIndex", |
3181 |
| - "kind": "value", |
3182 |
| - "name": "lastIndex", |
3183 |
| - "docstrings": [ |
3184 |
| - "`lastIndex(regexp)` returns the index the next match will start from.\n\nSee [`RegExp.lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\nlet someStr = \"Many words here.\"\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `0` to the console\n\nregexp->RegExp.exec(someStr)->ignore\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `4` to the console\n```" |
3185 |
| - ], |
3186 |
| - "signature": "let lastIndex: t => int" |
3187 |
| - }, |
3188 |
| - { |
3189 |
| - "id": "Core.Re.setLastIndex", |
3190 |
| - "kind": "value", |
3191 |
| - "name": "setLastIndex", |
3192 |
| - "docstrings": [ |
3193 |
| - "`setLastIndex(regexp, index)` set the index the next match will start from.\n\nSee [`RegExp.lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\nlet someStr = \"Many words here.\"\n\nregexp->RegExp.setLastIndex(4)\nregexp->RegExp.exec(someStr)->ignore\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `10` to the console\n```" |
3194 |
| - ], |
3195 |
| - "signature": "let setLastIndex: (t, int) => unit" |
3196 |
| - }, |
3197 |
| - { |
3198 |
| - "id": "Core.Re.ignoreCase", |
3199 |
| - "kind": "value", |
3200 |
| - "name": "ignoreCase", |
3201 |
| - "docstrings": [ |
3202 |
| - "`ignoreCase(regexp)` returns whether the ignore case (`i`) flag is set on this `RegExp`.\n\nSee [`RegExp.ignoreCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/ignoreCase) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.ignoreCase) // Logs `false`, since `i` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"i\")\nConsole.log(regexp2->RegExp.ignoreCase) // Logs `true`, since `i` is set\n```" |
3203 |
| - ], |
3204 |
| - "signature": "let ignoreCase: t => bool" |
3205 |
| - }, |
3206 |
| - { |
3207 |
| - "id": "Core.Re.global", |
3208 |
| - "kind": "value", |
3209 |
| - "name": "global", |
3210 |
| - "docstrings": [ |
3211 |
| - "`global(regexp)` returns whether the global (`g`) flag is set on this `RegExp`.\n\nSee [`RegExp.global`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/global) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.global) // Logs `true`, since `g` is set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"i\")\nConsole.log(regexp2->RegExp.global) // Logs `false`, since `g` is not set\n```" |
3212 |
| - ], |
3213 |
| - "signature": "let global: t => bool" |
3214 |
| - }, |
3215 |
| - { |
3216 |
| - "id": "Core.Re.multiline", |
3217 |
| - "kind": "value", |
3218 |
| - "name": "multiline", |
3219 |
| - "docstrings": [ |
3220 |
| - "`multiline(regexp)` returns whether the multiline (`m`) flag is set on this `RegExp`.\n\nSee [`RegExp.multiline`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/multiline) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.multiline) // Logs `false`, since `m` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"mi\")\nConsole.log(regexp2->RegExp.multiline) // Logs `true`, since `m` is set\n```" |
3221 |
| - ], |
3222 |
| - "signature": "let multiline: t => bool" |
3223 |
| - }, |
3224 |
| - { |
3225 |
| - "id": "Core.Re.source", |
3226 |
| - "kind": "value", |
3227 |
| - "name": "source", |
3228 |
| - "docstrings": [ |
3229 |
| - "`source(regexp)` returns the source text for this `RegExp`, without the two forward slashes (if present), and without any set flags.\n\nSee [`RegExp.source`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/source) on MDN.\n\n## Examples\n```rescript\nlet regexp = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp->RegExp.source) // Logs `\\w+`, the source text of the `RegExp`\n```" |
3230 |
| - ], |
3231 |
| - "signature": "let source: t => string" |
3232 |
| - }, |
3233 |
| - { |
3234 |
| - "id": "Core.Re.sticky", |
3235 |
| - "kind": "value", |
3236 |
| - "name": "sticky", |
3237 |
| - "docstrings": [ |
3238 |
| - "`sticky(regexp)` returns whether the sticky (`y`) flag is set on this `RegExp`.\n\nSee [`RegExp.sticky`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.unicode) // Logs `false`, since `y` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"my\")\nConsole.log(regexp2->RegExp.unicode) // Logs `true`, since `y` is set\n```" |
3239 |
| - ], |
3240 |
| - "signature": "let sticky: t => bool" |
3241 |
| - }, |
3242 |
| - { |
3243 |
| - "id": "Core.Re.unicode", |
3244 |
| - "kind": "value", |
3245 |
| - "name": "unicode", |
3246 |
| - "docstrings": [ |
3247 |
| - "`unicode(regexp)` returns whether the unicode (`y`) flag is set on this `RegExp`.\n\nSee [`RegExp.unicode`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.unicode) // Logs `false`, since `u` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"mu\")\nConsole.log(regexp2->RegExp.unicode) // Logs `true`, since `u` is set\n```" |
3248 |
| - ], |
3249 |
| - "signature": "let unicode: t => bool" |
3250 |
| - } |
3251 |
| - ] |
3252 |
| - }, |
3253 |
| - "core/internal": { |
3254 |
| - "id": "Core.Internal", |
3255 |
| - "name": "Internal", |
3256 |
| - "docstrings": [], |
3257 |
| - "items": [] |
3258 |
| - }, |
3259 |
| - "core/mapperrt": { |
3260 |
| - "id": "Core.MapperRt", |
3261 |
| - "name": "MapperRt", |
3262 |
| - "docstrings": [], |
3263 |
| - "items": [] |
3264 |
| - }, |
3265 | 3070 | "core/intl": {
|
3266 | 3071 | "id": "Core.Intl",
|
3267 | 3072 | "name": "Intl",
|
|
0 commit comments