CenterForDigitalHumanities / CenterForDigitalHumanities/rerum_server_nodejs

Code Optimization

Offen
#53 0 Kommentare 1 Reaktion 3 zugewiesene Personen Beansprucht von @thehabes Auf GitHub ansehen
enhancement
Vorherrschende Sprache
JavaScript
Sterne
3
Forks
6
Ø Merge
2 T. 47 Min.
Gemergte PRs (30 T.)
4

Beschreibung

- Conditional assignments
- conditional and logical chains
- `a ? yay : boo` and `??`
- `hey["horse"]` and `hey.horse`
- `obj.hasOwnProperty("__rerum")` and `obj?.__rerum`
- tic, single, and double quote string after `=` and in foo("param", 'parame', \`paramete\`)
- `const` and `let`
- semicolon that ends a line of code
- #82
- pass `db.collection` into controllers
- separate controller actions from the database manager
- etc.

Line it up. Be consistent. Test what you change, don't break anything.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.