New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@naverpay/device-info

Package Overview
Dependencies
Maintainers
8
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@naverpay/device-info

Device information

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
8
Created
Source

@naverpay/device-info

A library for converting device IDs to user-friendly model names

Installation

npm install @naverpay/device-info
# or
yarn add @naverpay/device-info
# or
pnpm add @naverpay/device-info

Quick Start

import { ios, aos } from "@naverpay/device-info";

console.log(ios["iPhone15,4"]); // 'iPhone 15'
console.log(aos["SM-S901B"]); // 'Galaxy S22'

API

ios

Object containing iOS device identifier to model name mappings.

  • Type: Record<string, string>
  • Example: iPhone14,2iPhone 13 Pro

aos

Object containing Android device model to marketing name mappings.

  • Type: Record<string, string>
  • Example: SM-G991BGalaxy S21 5G

Examples

Basic Usage

import { ios, aos } from "@naverpay/device-info";

// iOS
const iosModel = ios["iPhone14,2"] || "Unknown iPhone";

// Android
const androidModel = aos["SM-G991B"] || "Unknown Android";

With Fallback

function getDeviceName(deviceId, platform) {
  if (platform === "ios") {
    return ios[deviceId] || `Unknown iOS (${deviceId})`;
  } else if (platform === "android") {
    return aos[deviceId] || `Unknown Android (${deviceId})`;
  }
  return "Unknown Device";
}

FAQ

Q: How often is the data updated?
A: Device data is updated weekly (every Monday) from official sources.

Q: What if a device ID is not found?
A: The library returns undefined. Always provide a fallback value.

Q: Where does the data come from?
A:

  • iOS: The Apple Wiki
  • Android: Google Play Supported Devices

License

MIT

FAQs

Package last updated on 27 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts