|
5068 | 5068 | "kind": "value",
|
5069 | 5069 | "name": "charCodeAt",
|
5070 | 5070 | "docstrings": [
|
5071 |
| - "`charCodeAt(str, index)` returns the character code at position `index` in\nstring `str` the result is in the range 0-65535, unlike `codePointAt`, so it\nwill not work correctly for characters with code points greater than or equal\nto 0x10000. The return type is `float` because this function returns NaN if\n`index` is less than zero or greater than the length of the string.\nSee [`String.charCodeAt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt) on MDN.\n\n## Examples\n\n```rescript\nString.charCodeAt(`😺`, 0) == 0xd83d->Int.toFloat\nString.codePointAt(`😺`, 0) == Some(0x1f63a)\n```" |
| 5071 | + "`charCodeAt(str, index)` returns the character code at position `index` in\nstring `str` the result is in the range 0-65535, unlike `codePointAt`, so it\nwill not work correctly for characters with code points greater than or equal\nto 0x10000.\nSee [`String.charCodeAt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt) on MDN.\n\n## Examples\n\n```rescript\nString.charCodeAt(`😺`, 0) == Some(0xd83d)\nString.charCodeAt(\"\", 0) == None\nString.codePointAt(`😺`, 0) == Some(0x1f63a)\n```" |
5072 | 5072 | ],
|
5073 |
| - "signature": "let charCodeAt: (string, int) => float" |
| 5073 | + "signature": "let charCodeAt: (string, int) => option<int>" |
| 5074 | + }, |
| 5075 | + { |
| 5076 | + "id": "Stdlib.String.charCodeAtUnsafe", |
| 5077 | + "kind": "value", |
| 5078 | + "name": "charCodeAtUnsafe", |
| 5079 | + "docstrings": [ |
| 5080 | + "`charCodeAtUnsafe(str, index)` returns the character code at position `index` in\nstring `str` the result is in the range 0-65535, unlike `codePointAt`, so it\nwill not work correctly for characters with code points greater than or equal\nto 0x10000.\nBeware: If the index is out of range, it will return `NaN` which is not actually a valid int.\nSee [`String.charCodeAt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt) on MDN.\n\n## Examples\n\n```rescript\nString.charCodeAtUnsafe(`😺`, 0) == 0xd83d\nString.codePointAt(`😺`, 0) == Some(0x1f63a)\n```" |
| 5081 | + ], |
| 5082 | + "signature": "let charCodeAtUnsafe: (string, int) => int" |
5074 | 5083 | },
|
5075 | 5084 | {
|
5076 | 5085 | "id": "Stdlib.String.codePointAt",
|
|
8820 | 8829 | "kind": "value",
|
8821 | 8830 | "name": "isNaN",
|
8822 | 8831 | "docstrings": [
|
8823 |
| - "`isNaN(v)` tests if the given `v` is `NaN`.\nSee [`NaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN) on MDN.\n\n## Examples\n\n```rescript\nFloat.isNaN(3.0) // false\nFloat.isNaN(Float.Constants.nan) // true\n```" |
| 8832 | + "`isNaN(v)` tests if the given `v` is `NaN`.\nSee [`isNaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) on MDN.\n\n## Examples\n\n```rescript\nFloat.isNaN(3.0) // false\nFloat.isNaN(Float.Constants.nan) // true\n```" |
8824 | 8833 | ],
|
8825 | 8834 | "signature": "let isNaN: float => bool"
|
8826 | 8835 | },
|
|
12000 | 12009 | ],
|
12001 | 12010 | "signature": "let filterMap: (array<'a>, 'a => option<'b>) => array<'b>"
|
12002 | 12011 | },
|
| 12012 | + { |
| 12013 | + "id": "Stdlib.Array.filterMapWithIndex", |
| 12014 | + "kind": "value", |
| 12015 | + "name": "filterMapWithIndex", |
| 12016 | + "docstrings": [ |
| 12017 | + "`filterMapWithIndex(array, fn)`\n\nCalls `fn` for each element and returns a new array containing results of the `fn` calls which are not `None`.\n\n## Examples\n\n```rescript\n[\"Hello\", \"Hi\", \"Good bye\"]->Array.filterMapWithIndex((item, index) =>\n switch item {\n | \"Hello\" => Some(index)\n | _ => None\n }\n) == [0]\n```" |
| 12018 | + ], |
| 12019 | + "signature": "let filterMapWithIndex: (array<'a>, ('a, int) => option<'b>) => array<'b>" |
| 12020 | + }, |
12003 | 12021 | {
|
12004 | 12022 | "id": "Stdlib.Array.keepSome",
|
12005 | 12023 | "kind": "value",
|
|
0 commit comments