npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dr-coton/ios-device-list

v1.2.0

Published

Searchable collection of Apple devices

Downloads

32

Readme

iOS device list

npm

Searchable collection of Apple devices.

Parameters per device: Generation, Model number ("A" Number), Bootrom, Variant, FCC ID, Internal Name, Identifier, Case Material, Color, Storage, Model

Sources:

  • https://en.wikipedia.org/wiki/List_of_iOS_devices
  • https://www.theiphonewiki.com/wiki/Models
  • https://developer.apple.com/reference/uikit/uidevice
  • https://support.apple.com/en-ph/HT201296

Install

$ npm install @dr-coton/ios-device-list

Usage

In node:

var iosDevices = require("@dr-coton/ios-device-list");

.deviceTypes() : Array

Returns the device type list: airpods, apple_tv, apple_watch, homepod, ipad, ipad_air, ipad_pro, ipad_mini, iphone, ipod_touch

.devices([type]) : Array

Returns the full device list.

With optional type parameter returns the device list of the actual type.

.generations([type]) : Array

Returns the full Generation list.

With optional type parameter returns the generation list of the actual type.

.anumbers([type]) : Array

Returns the full "A" Number list.

With optional type parameter returns the "A" Number list of the actual type.

.fccids([type]) : Array

Returns the full FCC ID list.

With optional type parameter returns the FCC ID list of the actual type.

.internalNames([type]) : Array

Returns the full Internal Name list.

With optional type parameter returns the Internal Name list of the actual type.

.identifiers([type]) : Array

Returns the full Identifier list.

With optional type parameter returns the Identifier list of the actual type.

.colors([type]) : Array

Returns the full Color list.

With optional type parameter returns the Color list of the actual type.

.storages([type]) : Array

Returns the full Storage list.

With optional type parameter returns the Storage list of the actual type.

.models([type]) : Array

Returns the full Model list.

With optional type parameter returns the Model list of the actual type.

.deviceByGeneration(generation, [type], [options]) : Array

Returns a device list with matching Generation.

With optional type parameter the result is filtered by the device type.

options is an Object.

  • caseInsensitive: boolean (default false) - do not care of case type
  • contains: boolean (default false) - return partial (substring) results too

.deviceByANumber(anumber, [type], [options]) : Array

Returns a device list with matching "A" Number.

With optional type parameter the result is filtered by the device type.

.deviceByFCCID(fccid, [type], [options]) : Array

Returns a device list with matching FCC ID.

With optional type parameter the result is filtered by the device type.

.deviceByInternalName(name, [type], [options]) : Array

Returns a device list with matching Internal Name.

With optional type parameter the result is filtered by the device type.

.deviceByIdentifier(id, [type], [options]) : Array

Returns a device list with matching Identifier.

With optional type parameter the result is filtered by the device type.

.deviceByColor(color, [type], [options]) : Array

Returns a device list with matching Color.

With optional type parameter the result is filtered by the device type.

.deviceByStorage(storage, [type], [options]) : Array

Returns a device list with matching Storage.

With optional type parameter the result is filtered by the device type.

.deviceByModel(model, [type], [options]) : Array

Returns a device list with matching Model.

With optional type parameter the result is filtered by the device type.

.generationByIdentifier(id, [type]) : String

Returns the generation name with matching Identifier.

With optional type parameter the result is filtered by the device type.

Example

var iosDevices = require("ios-device-list");

var deviceTypes = iosDevices.deviceTypes();
var devices = iosDevices.devices();

console.log(deviceTypes.length);
// 6

console.log(devices.length);
// 727

console.log(devices[500]);
// { Type: 'iphone',
//   Generation: 'iPhone 5c',
//   ANumber: [ 'A1456', 'A1532' ],
//   Bootrom: [ 'Bootrom 1145.3' ],
//   Variant: 'iPhone5,3',
//   FCCID: [ 'BCG‑E2644A' ],
//   InternalName: 'N48AP',
//   Identifier: 'iPhone5,3',
//   Color: 'Yellow',
//   Storage: '32 GB',
//   Model: 'MF135' }

var iphone82;

iphone82 = iosDevices.deviceByIdentifier("iPhone8,2");
console.log(iphone82.length);
// 24

iphone82 = iosDevices.deviceByIdentifier("iphone8,2", null, {
  caseInsensitive: true,
});
console.log(iphone82.length);
// 24

iphone82 = iosDevices.deviceByIdentifier("iPhone8", null, { contains: true });
console.log(iphone82.length);
// 56

var gen = iosDevices.generationByIdentifier("iPhone8,2");
console.log(gen);
// 'iPhone 6s Plus'

License

ios-device-list is licensed under the MIT Open Source license. For more information, see the LICENSE file in this repository.