By participating, you are expected to uphold Code of Conduct.
git clone [email protected]:mikolalysenko/mudb.git && cd mudb
npm i
npm run watch
npm run build
# run all tests
npm run test-all
# run tests in a module
npm run test [module]
# run tests in rda
npm run test rda
# run tests in socket/web
npm run test socket/web
# run tests in a file
npm run test [module test_file]
# run tests in rda/test/inverse.ts
npm run test rda inverse
# run tests in socket/web/test/server.ts
npm run test socket/web server
npm run coverage [module]
open coverage/index.html
npm run release
- Name types and enums in PascalCase.
- Name variables, properties, and functions in camelCase.
- Name constant in SCREAMING_SNAKE_CASE.
- Prefix private properties with
_
. - Prefer whole words in names.
- Indent with 4 spaces.
- No spaces around the colon between name and type.
class DBEvent { type:string; payload:any; timestamp:number; constructor(type:string, payload:any) { } }
- But do put a space after the function name and spaces around the colon for function return types.
function noop () : void { }
- Use
const
by default. - Use single quotes for strings. Use template literals instead of concatenations.
- Always surround loop and conditional bodies with curly braces.