Skip to content

Commit f452234

Browse files
authored
docs(firebase-crashlytics): fix table of contents (#211)
* docs(firebase-crashlytics): update * fix: table of contents
1 parent 355e469 commit f452234

File tree

1 file changed

+35
-34
lines changed

1 file changed

+35
-34
lines changed

packages/firebase-crashlytics/README.md

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
1-
<!-- vscode-markdown-toc -->
2-
* 1. [Intro](#Intro)
3-
* 2. [Installation](#Installation)
4-
* 3. [Use @nativescript/firebase-crashlytics](#Usenativescriptfirebase-crashlytics)
5-
* 3.1. [Log a crash context](#Logacrashcontext)
6-
* 3.2. [Set crash attributes for more context data](#Setcrashattributesformorecontextdata)
7-
* 3.3. [Test crashlytics](#Testcrashlytics)
8-
* 3.4. [Report errors manually](#Reporterrorsmanually)
9-
* 3.5. [Manually enable or disable crashlytics collection](#Manuallyenableordisablecrashlyticscollection)
10-
* 4. [API](#API)
11-
* 4.1. [Crashlytics](#Crashlytics)
12-
* 4.1.1. [Properties](#Properties)
13-
* 4.1.2. [Methods](#Methods)
14-
* 5. [License](#License)
15-
16-
<!-- vscode-markdown-toc-config
17-
numbering=true
18-
autoSave=true
19-
/vscode-markdown-toc-config -->
20-
<!-- /vscode-markdown-toc --># @nativescript/firebase-crashlytics
21-
22-
## 1. <a name='Intro'></a>Intro
1+
2+
# @nativescript/firebase-crashlytics
3+
4+
* [Intro](#Intro)
5+
* [Installation](#Installation)
6+
* [Use @nativescript/firebase-crashlytics](#use-nativescriptfirebase-crashlytics)
7+
* [Log a crash context](#log-a-crash-context)
8+
* [Set crash attributes for more context data](#set-crash-attributes-for-more-context-data)
9+
* [Test crashlytics](#test-crashlytics)
10+
* [Report errors manually](#report-errors-manually)
11+
* [Manually enable or disable crashlytics collection](#manually-enable-or-disable-crashlytics-collection
12+
* [API](#API)
13+
* [Crashlytics](#Crashlytics)
14+
* [Properties](#Properties)
15+
* [Methods](#Methods)
16+
* [License](#License)
17+
2318

2419
A plugin that allows you to add [Firebase Crashlytics](https://firebase.google.com/docs/crashlytics) to your NativeScript app.
2520

@@ -33,17 +28,20 @@ Crashlytics helps you to collect analytics and details about crashes and errors
3328

3429
[![image](https://img.youtube.com/vi/k_mdNRZzd30/hqdefault.jpg)](https://www.youtube.com/watch?v=k_mdNRZzd30)
3530

36-
## 2. <a name='Installation'></a>Installation
31+
32+
## Installation
3733

3834
Install the plugin by running the following command in the root directory of your project.
3935

4036
```cli
4137
npm install @nativescript/firebase-crashlytics
4238
```
4339

44-
## 3. <a name='Usenativescriptfirebase-crashlytics'></a>Use @nativescript/firebase-crashlytics
4540

46-
### 3.1. <a name='Logacrashcontext'></a>Log a crash context
41+
## Use @nativescript/firebase-crashlytics
42+
43+
### Log a crash context
44+
4745
Use the `log` method throughout your app to accumulate extra context for possible crashes that can happen.
4846

4947
```ts
@@ -54,7 +52,7 @@ const crashlytics = firebase().crashlytics();
5452
crashlytics.log('User signed in.');
5553
```
5654

57-
### 3.2. <a name='Setcrashattributesformorecontextdata'></a>Set crash attributes for more context data
55+
### Set crash attributes for more context data
5856

5957
For additional context, Crashlytics also offers various methods to set attributes for the crash report.
6058

@@ -96,15 +94,15 @@ const crashlytics = firebase().crashlytics();
9694
crashlytics.setUserId(user.uid);
9795
```
9896

99-
### 3.3. <a name='Testcrashlytics'></a>Test crashlytics
97+
### Test crashlytics
10098

10199
To test Crashlytics for your app, call the `crash` method to force a crash and in Firebase Console, see if the crash is logged.
102100

103101
```ts
104102
firebase().crashlytics().crash()
105103
```
106104

107-
### 3.4. <a name='Reporterrorsmanually'></a>Report errors manually
105+
### Report errors manually
108106

109107
Crashlytics also supports sending JavaScript stack traces to the Firebase console. This can be used in any situation where an error occurs but is caught by your code to recover gracefully.
110108

@@ -127,7 +125,7 @@ try {
127125
}
128126
```
129127

130-
### 3.5. <a name='Manuallyenableordisablecrashlyticscollection'></a>Manually enable or disable crashlytics collection
128+
### Manually enable or disable crashlytics collection
131129

132130
As Crashlytics will be sending certain information regarding the user, users may want to opt out of the crash reporting. To disable crashlytics collection, call the `setCrashlyticsCollectionEnabled` method on `firebase().crashlytics()` passing it `false` This can be done throughout the app with a simple method call to setCrashlyticsCollectionEnabled:
133131

@@ -137,19 +135,22 @@ import { firebase } from '@nativescript/firebase-core';
137135
firebase().crashlytics().setCrashlyticsCollectionEnabled(false);
138136
```
139137

140-
## 4. <a name='API'></a>API
141-
### 4.1. <a name='Crashlytics'></a>Crashlytics
138+
## API
139+
140+
### Crashlytics
142141

143142
The Crashlytics class has the following members.
144-
#### 4.1.1. <a name='Properties'></a>Properties
143+
144+
#### Properties
145+
145146
| Property | Type | Description
146147
|----------|------|------------
147148
| `ios` | | _readonly_
148149
| `android` | _readonly_
149150
| `app` | [FirebaseApp]()| _readonly_
150151

152+
#### Methods
151153

152-
#### 4.1.2. <a name='Methods'></a>Methods
153154
| Method | Returns | Description
154155
|----------|------|------------
155156
| `checkForUnsentReports()` | `Promise<boolean>`
@@ -164,6 +165,6 @@ The Crashlytics class has the following members.
164165
| `setCrashlyticsCollectionEnabled(enabled: boolean)` | `void`
165166
| `setUserId(userId: string)` | `void`
166167

167-
## 5. <a name='License'></a>License
168+
## License
168169

169170
Apache License Version 2.0

0 commit comments

Comments
 (0)