@jnanda/a_library 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/captain.js +9 -1
  2. package/package.json +7 -2
package/captain.js CHANGED
@@ -16,6 +16,14 @@
16
16
 
17
17
  };
18
18
 
19
- global.Captain = Captain;
19
+ // Browser
20
+ if (typeof window !== "undefined") {
21
+ global.Captain = Captain;
22
+ }
23
+
24
+ // Node
25
+ if (typeof module !== "undefined" && module.exports) {
26
+ module.exports = Captain;
27
+ }
20
28
 
21
29
  })(typeof window !== "undefined" ? window : global);
package/package.json CHANGED
@@ -1,12 +1,17 @@
1
1
  {
2
2
  "name": "@jnanda/a_library",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "my sample library",
5
5
  "main": "captain.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },
9
- "keywords": ["captain", "js", "library","sample"],
9
+ "keywords": [
10
+ "captain",
11
+ "js",
12
+ "library",
13
+ "sample"
14
+ ],
10
15
  "author": "jnanda",
11
16
  "license": "MIT"
12
17
  }