@memberjunction/global 1.0.6 → 1.0.7

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.
Files changed (2) hide show
  1. package/package.json +24 -24
  2. package/readme.md +62 -62
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
- {
2
- "name": "@memberjunction/global",
3
- "version": "1.0.6",
4
- "description": "MemberJunction: Global Object - Needed for ALL other MJ components",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "files": [
8
- "/dist"
9
- ],
10
- "scripts": {
11
- "start": "ts-node-dev src/index.ts",
12
- "build": "tsc",
13
- "test": "echo \"Error: no test specified\" && exit 1"
14
- },
15
- "author": "MemberJunction.com",
16
- "license": "ISC",
17
- "devDependencies": {
18
- "ts-node-dev": "^2.0.0",
19
- "typescript": "^5.3.3"
20
- },
21
- "dependencies": {
22
- "rxjs": "^7.8.1"
23
- }
24
- }
1
+ {
2
+ "name": "@memberjunction/global",
3
+ "version": "1.0.7",
4
+ "description": "MemberJunction: Global Object - Needed for ALL other MJ components",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "/dist"
9
+ ],
10
+ "scripts": {
11
+ "start": "ts-node-dev src/index.ts",
12
+ "build": "tsc",
13
+ "test": "echo \"Error: no test specified\" && exit 1"
14
+ },
15
+ "author": "MemberJunction.com",
16
+ "license": "ISC",
17
+ "devDependencies": {
18
+ "ts-node-dev": "^2.0.0",
19
+ "typescript": "^5.3.3"
20
+ },
21
+ "dependencies": {
22
+ "rxjs": "^7.8.1"
23
+ }
24
+ }
package/readme.md CHANGED
@@ -1,62 +1,62 @@
1
- ```markdown
2
- # @memberjunction/global
3
-
4
- The `@memberjunction/global` library is designed to coordinate events and components across MemberJunction. This library exports a `MJGlobal` class along with a `RegisterClass` function decorator to manage class registration with the global class factory. It also exports some core elements from the `./ClassFactory` and `./interface` modules for ease of use.
5
-
6
- ## Installation
7
-
8
- ```bash
9
- npm install @memberjunction/global
10
- ```
11
-
12
- ## Usage
13
-
14
- Below are some usage examples based on the provided code:
15
-
16
- ### Importing the Library
17
-
18
- ```javascript
19
- import * as MJ from '@memberjunction/global';
20
- ```
21
-
22
- ### Using the MJGlobal Class
23
-
24
- ```javascript
25
- // Getting the singleton instance of MJGlobal
26
- const globalInstance = MJ.MJGlobal.Instance;
27
-
28
- // Registering a component
29
- globalInstance.RegisterComponent(yourComponent);
30
-
31
- // Raising an event
32
- globalInstance.RaiseEvent(yourEvent);
33
-
34
- // Listening for events
35
- const listener = globalInstance.GetEventListener();
36
- ```
37
-
38
- ### Using the RegisterClass Decorator
39
-
40
- ```javascript
41
- @MJ.RegisterClass(yourBaseClass)
42
- class YourClass {
43
- // ...
44
- }
45
- ```
46
-
47
- ## Contributing
48
-
49
- Feel free to open issues or pull requests if you have suggestions or fixes.
50
-
51
- ## License
52
-
53
- Specify the license for your project.
54
-
55
- ## Support
56
-
57
- For support, please contact [support@example.com](mailto:support@example.com) or open an issue on the project repository.
58
-
59
- ```
60
-
61
- This README file provides a brief overview of the library, installation instructions, usage examples, and other common sections like contributing, license, and support information. You may want to further customize this file to better fit the `@memberjunction/global` library and its community, especially the support and license sections.
62
-
1
+ ```markdown
2
+ # @memberjunction/global
3
+
4
+ The `@memberjunction/global` library is designed to coordinate events and components across MemberJunction. This library exports a `MJGlobal` class along with a `RegisterClass` function decorator to manage class registration with the global class factory. It also exports some core elements from the `./ClassFactory` and `./interface` modules for ease of use.
5
+
6
+ ## Installation
7
+
8
+ ```bash
9
+ npm install @memberjunction/global
10
+ ```
11
+
12
+ ## Usage
13
+
14
+ Below are some usage examples based on the provided code:
15
+
16
+ ### Importing the Library
17
+
18
+ ```javascript
19
+ import * as MJ from '@memberjunction/global';
20
+ ```
21
+
22
+ ### Using the MJGlobal Class
23
+
24
+ ```javascript
25
+ // Getting the singleton instance of MJGlobal
26
+ const globalInstance = MJ.MJGlobal.Instance;
27
+
28
+ // Registering a component
29
+ globalInstance.RegisterComponent(yourComponent);
30
+
31
+ // Raising an event
32
+ globalInstance.RaiseEvent(yourEvent);
33
+
34
+ // Listening for events
35
+ const listener = globalInstance.GetEventListener();
36
+ ```
37
+
38
+ ### Using the RegisterClass Decorator
39
+
40
+ ```javascript
41
+ @MJ.RegisterClass(yourBaseClass)
42
+ class YourClass {
43
+ // ...
44
+ }
45
+ ```
46
+
47
+ ## Contributing
48
+
49
+ Feel free to open issues or pull requests if you have suggestions or fixes.
50
+
51
+ ## License
52
+
53
+ Specify the license for your project.
54
+
55
+ ## Support
56
+
57
+ For support, please contact [support@example.com](mailto:support@example.com) or open an issue on the project repository.
58
+
59
+ ```
60
+
61
+ This README file provides a brief overview of the library, installation instructions, usage examples, and other common sections like contributing, license, and support information. You may want to further customize this file to better fit the `@memberjunction/global` library and its community, especially the support and license sections.
62
+