mirror of
https://github.com/badges/shields.git
synced 2025-11-09 12:40:59 +03:00
Unify order of properties and methods in services (#3353)
I find having these in a consistent order makes the services much faster to read. This is the order I’ve generally been using: 1. Category 2. Route 3. Examples 4. Rendering 5. Other helpers (`fetch()`, `transform()`) 6. `handle()`
This commit is contained in:
@@ -12,10 +12,6 @@ module.exports = class PypiImplementation extends PypiBase {
|
||||
return this.buildRoute('pypi/implementation')
|
||||
}
|
||||
|
||||
static get defaultBadgeData() {
|
||||
return { label: 'implementation' }
|
||||
}
|
||||
|
||||
static get examples() {
|
||||
return [
|
||||
{
|
||||
@@ -28,6 +24,10 @@ module.exports = class PypiImplementation extends PypiBase {
|
||||
]
|
||||
}
|
||||
|
||||
static get defaultBadgeData() {
|
||||
return { label: 'implementation' }
|
||||
}
|
||||
|
||||
static render({ implementations }) {
|
||||
return {
|
||||
message: implementations.sort().join(' | '),
|
||||
|
||||
Reference in New Issue
Block a user