@decaf-ts/utils 0.3.13 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ![Banner](./workdocs/assets/Banner.png)
1
+ ![Banner](./workdocs/assets/decaf-logo.svg)
2
2
 
3
3
  ## Decaf's Utils Module
4
4
 
@@ -445,6 +445,24 @@ writer.error('Command not found: node'); // This will be logged as an error
445
445
  ```
446
446
 
447
447
 
448
+ ## Coding Principles
449
+
450
+ - group similar functionality in folders (analog to namespaces but without any namespace declaration)
451
+ - one class per file;
452
+ - one interface per file (unless interface is just used as a type);
453
+ - group types as other interfaces in a types.ts file per folder;
454
+ - group constants or enums in a constants.ts file per folder;
455
+ - group decorators in a decorators.ts file per folder;
456
+ - always import from the specific file, never from a folder or index file (exceptions for dependencies on other packages);
457
+ - prefer the usage of established design patters where applicable:
458
+ - Singleton (can be an anti-pattern. use with care);
459
+ - factory;
460
+ - observer;
461
+ - strategy;
462
+ - builder;
463
+ - etc;
464
+
465
+
448
466
  ### Related
449
467
 
450
468
  [![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=decaf-ts&repo=decaf-ts)](https://github.com/decaf-ts/decaf-ts)
@@ -483,4 +501,4 @@ So if you can, if this project in any way. either by learning something or simpl
483
501
 
484
502
  This project is released under the [MIT License](./LICENSE.md).
485
503
 
486
- By developers, for developers...
504
+ By developers, for developers...