logo

/Doc|v1.1.1

Class

new ChartAlbum(options)extends.jsline 45

EXTENDS
  • Album
PARAMETERS
NameTypeDescription

options

object

PROPERTIES
NameTypeDescription

title

string

Title of album

genres

[ Array ]

Genre list of album

playTime

number = 0

Play time of all songs (unit is seconds)

active

boolean = true

Whether album is active or not

artist

object

PROPERTIES
NameTypeDescription

name

string

Name of artist

type

[ string ]

Type of artist

debut

[ string ]

Debut daofte of artist

company

[ object ]

Company of album

PROPERTIES
NameTypeDescription

agency

[ string ]

Agency name of album

distributor

[ string ]

Distributor name of album

rank

number = 999

Rank of album

EXAMPLES
const options = {
  title: 'รท',
  genres: ['Rock', 'Pop'],
  playTime: 3600,
  active: true,
  artist: {
    name: 'Ed Sheeran',
    type: 'Solo',
    debut: '2005'
  },
  company: {
    agency: 'Atlantic Records UK',
    distributor: 'Warner Music Korea'
  },
  rank: 1
};
const instance = new ChartAlbum(options);

console.log(instance);

Static Methods

overridegetDescription(album)extends.jsline 76

Returns description about chart album.

PARAMETERS
NameTypeDescription

album

Album

Instance of Album class

RETURNS:
{

string

} - Description
EXAMPLES
const album1 = new Album({
  // ...
  title: 'foo',
  rank: 10
});
const album2 = new Album({
  // ...
  title: 'bar',
  rank: 99
});

Album.getDescription(album1); // "The rank of "foo" album is 10."
Album.getDescription(album2); // "The rank of "bar" album is 99."

Instance Methods

getRank()extends.jsline 96

Returns rank of album.

RETURNS:
{

number

} - Rank

overridegetTitle()extends.jsline 88

Returns title of album.

RETURNS:
{

string

} - Title
Resizable