-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: JakeChampion <JakeChampion@users.noreply.github.com>
- Loading branch information
1 parent
5274fd5
commit 6b9d825
Showing
17,550 changed files
with
500 additions
and
635,393 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
hide_title: false | ||
hide_table_of_contents: false | ||
pagination_next: null | ||
pagination_prev: null | ||
--- | ||
|
||
# Device.lookup() | ||
|
||
Look up the data associated with a particular User-Agent string. | ||
|
||
|
||
## Syntax | ||
|
||
```js | ||
lookup(userAgent) | ||
``` | ||
|
||
### Return value | ||
|
||
If there is data associated with the User-Agent, a `Device` instance is returned. | ||
Otherwise, `null` is returned. |
16 changes: 16 additions & 0 deletions
16
documentation/docs/fastly:device/Device/prototype/brand.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
hide_title: false | ||
hide_table_of_contents: false | ||
pagination_next: null | ||
pagination_prev: null | ||
--- | ||
# Device.prototype.brand | ||
|
||
The read-only **`brand`** property of the `Device` interface is | ||
either a string stating the brand of the device, which can be different from the manufacturer of that device. | ||
If no brand is known, the value will be `null`. | ||
|
||
|
||
## Value | ||
|
||
Either a string value if a brand is known, otherwise `null`. |
18 changes: 18 additions & 0 deletions
18
documentation/docs/fastly:device/Device/prototype/hardwareType.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
hide_title: false | ||
hide_table_of_contents: false | ||
pagination_next: null | ||
pagination_prev: null | ||
--- | ||
# Device.prototype.hardwareType | ||
|
||
The read-only **`hardwareType`** property of the `Device` interface is | ||
either a string stating the hardware type of the device, or `null` if the hardware type is not known. | ||
|
||
A string representation of the device's primary platform hardware. The most commonly used device types are also identified via boolean variables. Because a device may have multiple device types and this variable only has the primary type, we recommend using the boolean variables for logic and using this string representation for logging. | ||
|
||
|
||
|
||
## Value | ||
|
||
Either a string value if a hardware type is known, otherwise `null`. |
15 changes: 15 additions & 0 deletions
15
documentation/docs/fastly:device/Device/prototype/isDesktop.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
hide_title: false | ||
hide_table_of_contents: false | ||
pagination_next: null | ||
pagination_prev: null | ||
--- | ||
# Device.prototype.isDesktop | ||
|
||
The read-only **`isDesktop`** property of the `Device` interface is | ||
either a boolean stating if the device is a desktop web browser, or `null` if the this is not known. | ||
|
||
|
||
## Value | ||
|
||
Either a boolean stating if the device is a desktop web browser, or `null` if the this is not known. |
15 changes: 15 additions & 0 deletions
15
documentation/docs/fastly:device/Device/prototype/isGameConsole.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
hide_title: false | ||
hide_table_of_contents: false | ||
pagination_next: null | ||
pagination_prev: null | ||
--- | ||
# Device.prototype.isGameConsole | ||
|
||
The read-only **`isGameConsole`** property of the `Device` interface is | ||
either a boolean stating if the device is a video game console, or `null` if the this is not known. | ||
|
||
|
||
## Value | ||
|
||
Either a boolean stating if the device is a video game console, or `null` if the this is not known. |
15 changes: 15 additions & 0 deletions
15
documentation/docs/fastly:device/Device/prototype/isMediaPlayer.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
hide_title: false | ||
hide_table_of_contents: false | ||
pagination_next: null | ||
pagination_prev: null | ||
--- | ||
# Device.prototype.isMediaPlayer | ||
|
||
The read-only **`isMediaPlayer`** property of the `Device` interface is | ||
either a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known. | ||
|
||
|
||
## Value | ||
|
||
Either a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known. |
15 changes: 15 additions & 0 deletions
15
documentation/docs/fastly:device/Device/prototype/isMobile.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
hide_title: false | ||
hide_table_of_contents: false | ||
pagination_next: null | ||
pagination_prev: null | ||
--- | ||
# Device.prototype.isMobile | ||
|
||
The read-only **`isMobile`** property of the `Device` interface is | ||
either a boolean stating if the device is a mobile phone, or `null` if the this is not known. | ||
|
||
|
||
## Value | ||
|
||
Either a boolean stating if the device is a mobile phone, or `null` if the this is not known. |
15 changes: 15 additions & 0 deletions
15
documentation/docs/fastly:device/Device/prototype/isSmartTV.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
hide_title: false | ||
hide_table_of_contents: false | ||
pagination_next: null | ||
pagination_prev: null | ||
--- | ||
# Device.prototype.isSmartTV | ||
|
||
The read-only **`isSmartTV`** property of the `Device` interface is | ||
either a boolean stating if the device is a smart TV, or `null` if the this is not known. | ||
|
||
|
||
## Value | ||
|
||
Either a boolean stating if the device is a smart TV, or `null` if the this is not known. |
15 changes: 15 additions & 0 deletions
15
documentation/docs/fastly:device/Device/prototype/isTablet.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
hide_title: false | ||
hide_table_of_contents: false | ||
pagination_next: null | ||
pagination_prev: null | ||
--- | ||
# Device.prototype.isTablet | ||
|
||
The read-only **`isTablet`** property of the `Device` interface is | ||
either a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known. | ||
|
||
|
||
## Value | ||
|
||
Either a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known. |
15 changes: 15 additions & 0 deletions
15
documentation/docs/fastly:device/Device/prototype/isTouchscreen.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
hide_title: false | ||
hide_table_of_contents: false | ||
pagination_next: null | ||
pagination_prev: null | ||
--- | ||
# Device.prototype.isTouchscreen | ||
|
||
The read-only **`isTouchscreen`** property of the `Device` interface is | ||
either a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known. | ||
|
||
|
||
## Value | ||
|
||
Either a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known. |
15 changes: 15 additions & 0 deletions
15
documentation/docs/fastly:device/Device/prototype/model.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
hide_title: false | ||
hide_table_of_contents: false | ||
pagination_next: null | ||
pagination_prev: null | ||
--- | ||
# Device.prototype.model | ||
|
||
The read-only **`model`** property of the `Device` interface is | ||
either a string stating the model of the device, or `null` if the model is not known. | ||
|
||
|
||
## Value | ||
|
||
Either a string value if a model is known, otherwise `null`. |
15 changes: 15 additions & 0 deletions
15
documentation/docs/fastly:device/Device/prototype/name.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
hide_title: false | ||
hide_table_of_contents: false | ||
pagination_next: null | ||
pagination_prev: null | ||
--- | ||
# Device.prototype.name | ||
|
||
The read-only **`name`** property of the `Device` interface is | ||
either a string stating the name of the device, or `null` if the name is not known. | ||
|
||
|
||
## Value | ||
|
||
Either a string value if a name is known, otherwise `null`. |
24 changes: 24 additions & 0 deletions
24
documentation/docs/fastly:device/Device/prototype/toJSON.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
hide_title: false | ||
hide_table_of_contents: false | ||
pagination_next: null | ||
pagination_prev: null | ||
--- | ||
import {Fiddle} from '@site/src/components/fiddle'; | ||
|
||
# toJSON | ||
|
||
The `toJSON()` method of the Device interface is a serializer; | ||
it returns a JSON representation of the Device object. | ||
|
||
To get a JSON string, you can use `JSON.stringify(device)` directly; it will call `toJSON()` automatically. | ||
|
||
## Syntax | ||
|
||
```js | ||
toJSON() | ||
``` | ||
|
||
### Return value | ||
|
||
A JSON object that is the serialization of the Device object. |
Oops, something went wrong.