-
Notifications
You must be signed in to change notification settings - Fork 59
Developers Code Style
Heimdall development follows the Vue.js style guide provided by Vue.js Style Guide
Heimdall development follows the TypeScript style guide provided by TS Style Guide
Use this space to add common code style practices used for developing Heimdall
Recommend using async/await
when possible, and minimize promise chaining. Async/await makes JavaScript code more accessible to developers that aren't as familiar with JavaScript, and much easier to read.
The difference is that in an async function, JavaScript will pause the function execution until the promise settles. With .then()
, the rest of the function will continue to execute but JavaScript won't execute the .then()
callback until the promise settles.
If using promise chaining with .then()
, we need to put any logic we want to execute after the request in the promise chain. Any code placed after fetch() will execute immediately, before the fetch() is done.
From a performance point of view, await is just an internal version of .then()
(doing basically the same thing). The reason to choose one over the other doesn't really have to do with performance, but has to do with desired coding style or coding convenience.
Helping the overall cybersecurity strength of organizations.
- Home
- How to create a release
- Environment Variables Configuration
- Heimdall Authentication Methods
- Heimdall API Documentation
- Group and User Management
- Heimdall Interface Connections
- Heimdall Architecture Information
- Heimdall Class Diagrams
- Heimdall Development Tips & Tricks
- Heimdall Frontend Components
- Heimdall Processes Documentation
- Heimdall Heroku Documentation
- Developers Code Style
- Troubleshooting
- HDF Converter Mappings
- HDF Converters How Tos
- Manual Attestations
- Control Correlation Identifier (CCI) Converter