@decaf-ts/logging 0.3.24 → 0.3.26
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 +20 -0
- package/dist/logging.cjs +2 -2
- package/dist/logging.esm.cjs +2 -2
- package/lib/esm/index.js +1 -1
- package/lib/index.cjs +1 -1
- package/package.json +10 -8
package/README.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<!-- AUTO-GENERATED: logging/workdocs/1-Header.md -->
|
|
2
|
+

|
|
3
|
+
|
|
2
4
|
# Logging Library (decaf-ts/logging)
|
|
3
5
|
|
|
4
6
|
A small, flexible TypeScript logging library designed for framework-agnostic projects. It provides:
|
|
@@ -324,6 +326,24 @@ export class PaymentService {
|
|
|
324
326
|
```
|
|
325
327
|
|
|
326
328
|
|
|
329
|
+
## Coding Principles
|
|
330
|
+
|
|
331
|
+
- group similar functionality in folders (analog to namespaces but without any namespace declaration)
|
|
332
|
+
- one class per file;
|
|
333
|
+
- one interface per file (unless interface is just used as a type);
|
|
334
|
+
- group types as other interfaces in a types.ts file per folder;
|
|
335
|
+
- group constants or enums in a constants.ts file per folder;
|
|
336
|
+
- group decorators in a decorators.ts file per folder;
|
|
337
|
+
- always import from the specific file, never from a folder or index file (exceptions for dependencies on other packages);
|
|
338
|
+
- prefer the usage of established design patters where applicable:
|
|
339
|
+
- Singleton (can be an anti-pattern. use with care);
|
|
340
|
+
- factory;
|
|
341
|
+
- observer;
|
|
342
|
+
- strategy;
|
|
343
|
+
- builder;
|
|
344
|
+
- etc;
|
|
345
|
+
|
|
346
|
+
|
|
327
347
|
### Related
|
|
328
348
|
|
|
329
349
|
[](https://github.com/decaf-ts/decaf-ts)
|