is-even-pro-edition 1.0.0

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/index.js +13 -0
  2. package/package.json +16 -0
package/index.js ADDED
@@ -0,0 +1,13 @@
1
+ function isEvenProEdition(num, isPro) {
2
+ if (isPro) {
3
+ console.log("You are a pro");
4
+ const isEven = num % 2 === 0;
5
+ const output = isEven ? "even" : "odd";
6
+ console.log(`${num} is ${output}`);
7
+ }
8
+ else {
9
+ console.log("You need to be a pro to unlock this library's feature");
10
+ }
11
+ }
12
+
13
+ module.exports = isEvenProEdition;
package/package.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "is-even-pro-edition",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "license": "ISC",
6
+ "author": "Peter Yuan",
7
+ "type": "commonjs",
8
+ "main": "index.js",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git@github.com:peteryn/is-even-pro-edition.git"
12
+ },
13
+ "scripts": {
14
+ "test": "echo \"Error: no test specified\" && exit 1"
15
+ }
16
+ }