Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,21 @@ declare namespace useragent {
/** @deprecated */
patch: string;

brand: string;

model: string;

/**
* The representation of a parsed Device.
*
* @param [family='Other'] The name of the device
* @param [major='0'] Major version of the device
* @param [minor='0'] Minor version of the device
* @param [patch='0'] Patch version of the device
* @param [brand='Other'] The brand of the device
* @param [model='Other'] The model of the device
*/
constructor(
family?: string,
major?: string,
minor?: string,
patch?: string
brand?: string,
model?: string
);

/**
Expand All @@ -149,6 +152,8 @@ declare namespace useragent {
*/
toJSON(): {
family: string;
brand: string;
model: string;
major: string | undefined;
minor: string | undefined;
patch: string | undefined;
Expand Down
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,8 @@ OperatingSystem.prototype.toJSON = function toJSON(){
*
* @constructor
* @param {String} family The name of the device
* @param {String} major Major version of the device
* @param {String} minor Minor version of the device
* @param {String} patch Patch version of the device
* @param {String} brand The brand of the device
* @param {String} model The model of the device
* @api public
*/
function Device(family, brand, model) {
Expand Down Expand Up @@ -609,4 +608,4 @@ function replace(str, matches) {
replacement = replacement.replace(sub[0], matches[sub[1]])
}
return replacement;
}
}