This repository contains the static HTML, Javascript, CSS, and images content of the DTrader website.
- Airbnb JavaScript Style Guide is partially being followed in our dtrader code base.
Variables: Variables should be lowercase words separated by _
(snake_case) .
const field_name = '...';
Constant(Static) contents: Constant(Static) contents(numbers or strings) should be UPPER_SNAKE_CASE
. UPPER CASE and separated by _
.
const MY_STATIC_CONTENT = '...';
Functions: Functions should be camelCase. This is to easily distinguish between variables and functions.
const myFunction = () => { ... };
Modules: Module names and classes should be PascalCase.
const MyModule = (() => { ... })();
JavaScript elements: JavaScript elements start with el_
for a similar effect.
const el_test = document.getElementById('test');
Boolean: Those variables which store a boolean value, should start with is_
, has_
, ...
const is_updated = true;
const has_crypto = false;