@naverpay/device-info 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -10
- package/aos.json +35896 -1
- package/date.js +3 -0
- package/index.d.ts +15 -5
- package/index.js +2 -0
- package/ios.json +118 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# @naverpay/device-info
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A library for converting device IDs to user-friendly model names.
|
|
4
4
|
|
|
5
|
-
- iOS
|
|
6
|
-
-
|
|
5
|
+
- For iOS, it maps `Identifier` to `Generation`.
|
|
6
|
+
- For Android, it maps `Model` to Marketing `Name`.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- https://
|
|
8
|
+
These data are collected based on the following documents and updated every Monday:
|
|
9
|
+
|
|
10
|
+
- <https://storage.googleapis.com/play_public/supported_devices.html>
|
|
11
|
+
- <https://theapplewiki.com/wiki/Models>
|
|
11
12
|
|
|
12
13
|
## Installation
|
|
13
14
|
|
|
@@ -18,9 +19,9 @@ npm install --save @naverpay/device-info
|
|
|
18
19
|
## Usage
|
|
19
20
|
|
|
20
21
|
```javascript
|
|
21
|
-
import iOSDeviceInfo from
|
|
22
|
-
import androidDeviceInfo from
|
|
22
|
+
import iOSDeviceInfo from "@naverpay/device-info/ios.json";
|
|
23
|
+
import androidDeviceInfo from "@naverpay/device-info/aos.json";
|
|
23
24
|
|
|
24
|
-
console.log(iosDeviceInfo[
|
|
25
|
-
console.log(androidDeviceInfo[
|
|
25
|
+
console.log(iosDeviceInfo["iPhone15,4"]); // "iPhone 15"
|
|
26
|
+
console.log(androidDeviceInfo["SM-S901B"]); // "Galaxy S22"
|
|
26
27
|
```
|