vitalik-project 1.0.0 → 1.0.2

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/app.js +19 -1
  2. package/package.json +1 -1
package/app.js CHANGED
@@ -1 +1,19 @@
1
- console.log('Hello world');
1
+ function isPrime(n) {
2
+ if (n <= 1) return false;
3
+ for (let i = 2; i <= Math.sqrt(n); i++) {
4
+ if (n % i === 0) return false;
5
+ }
6
+ return true;
7
+ }
8
+ function factorial(n) {
9
+ if (n === 0) return 1;
10
+ let result = 1;
11
+ for (let i = 1; i <= n; i++) {
12
+ result *= i;
13
+ }
14
+ return result;
15
+ }
16
+ module.exports = {
17
+ isPrime,
18
+ factorial
19
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vitalik-project",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "My module",
5
5
  "main": "app.js",
6
6
  "author": "Vitalik",