2.4.1 • Published 4 years ago

hs-standard-sets v2.4.1

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

Hearthstone standard cards sets

npm version GitHub license CircleCI

hs-standard-sets is a utility that returns standard Hearthstone card sets available on a given date.

Usage

Returns the standard card sets that matches the conditions given by the options.

Options

OptionDefault
datenew Date()Returns available card sets at the given date. If omitted, the current date will be used.
withoutClassicfalseIf set to true, returns card sets excluding classic sets.
isExpiredfalseIf set to true, returns expired card sets.

The name of each card set conforms to "set" property provided by HearthstoneJSON.

in Node.js

import {sets} from 'hs-standard-sets';
// const sets = require('hs-standard-sets').sets;

sets(); // As of May 2, 2019
// => [ 'CORE', 'EXPERT1', 'GILNEAS', 'BOOMSDAY', 'TROLL', 'DALARAN' ]

sets({withoutClassic: true});
// => [ 'GILNEAS', 'BOOMSDAY', 'TROLL', 'DALARAN' ]

sets({isExpired: true});
// => [ 'NAXX', 'GVG', 'BRM', 'TGT', 'LOE', 'OG', 'KARA', 'GANGS', 'UNGORO', 'ICECROWN', 'LOOTAPALOOZA' ]

sets({date: new Date('2019-04-08')}); // Last day of the year of the Raven
// => [ 'CORE', 'EXPERT1', 'UNGORO', 'ICECROWN', 'LOOTAPALOOZA', 'GILNEAS', 'BOOMSDAY', 'TROLL' ]

in Browser

<script src="https://unpkg.com/hs-standard-sets/lib/index.js"></script>
<script>
HsStandardSets.sets(); // As of May 2, 2019
// => [ 'CORE', 'EXPERT1', 'GILNEAS', 'BOOMSDAY', 'TROLL', 'DALARAN' ]

HsStandardSets.sets({withoutClassic: true});
// => [ 'GILNEAS', 'BOOMSDAY', 'TROLL', 'DALARAN' ]

HsStandardSets.sets({isExpired: true});
// => [ 'NAXX', 'GVG', 'BRM', 'TGT', 'LOE', 'OG', 'KARA', 'GANGS', 'UNGORO', 'ICECROWN', 'LOOTAPALOOZA' ]

HsStandardSets.sets({date: new Date('2019-04-08')}); // Last day of the year of the Raven
// => [ 'CORE', 'EXPERT1', 'UNGORO', 'ICECROWN', 'LOOTAPALOOZA', 'GILNEAS', 'BOOMSDAY', 'TROLL' ]
</script>

Installation

npm install --save hs-standard-sets

Test

npm run test

License

MIT license

2.4.1

4 years ago

2.4.0

4 years ago

2.3.0

5 years ago

2.2.4

5 years ago

2.2.3

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.3

5 years ago

2.1.2

5 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago