lombardi 2.0.0 → 3.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.
package/README.md CHANGED
@@ -4,29 +4,28 @@
4
4
 
5
5
  ## Example
6
6
 
7
- ``` javascript
8
- var lombardi = require('lombardi');
7
+ ```javascript
8
+ import { lombardi } from 'lombardi';
9
9
 
10
10
  lombardi(100, 10);
11
- // => 125
11
+ // => 125.89254117941672
12
12
  ```
13
13
 
14
14
  ## Installation
15
15
 
16
- ``` bash
16
+ ```bash
17
17
  $ npm install lombardi
18
18
  ```
19
19
 
20
20
  ## API
21
21
 
22
- ``` javascript
23
- var lombardi = require('lombardi');
22
+ ```javascript
23
+ import { lombardi } from 'lombardi';
24
24
  ```
25
25
 
26
- ### `lombardi(weight, reps)`
26
+ ### `lombardi(weight: number, reps: number)`
27
27
 
28
28
  Given _Number_ `weight` and _Number_ `reps`, returns the one-repetition maximum
29
29
  from Lombardi's formula as a _Number_.
30
30
 
31
-
32
31
  [1]: https://en.wikipedia.org/wiki/One-repetition_maximum#Lombardi
package/dist/index.cjs ADDED
@@ -0,0 +1,19 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ // src/index.ts
3
+ /**
4
+ * Estimates a one-repetition maximum using Lombardi's formula.
5
+ *
6
+ * @param weight The weight lifted.
7
+ * @param reps The number of repetitions performed with `weight`.
8
+ * @returns The estimated one-repetition maximum.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * lombardi(100, 10);
13
+ * // => 125.89254117941672
14
+ * ```
15
+ */
16
+ function lombardi(weight, reps) {
17
+ return weight * reps ** .1;
18
+ }
19
+ exports.lombardi = lombardi;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Estimates a one-repetition maximum using Lombardi's formula.
3
+ *
4
+ * @param weight The weight lifted.
5
+ * @param reps The number of repetitions performed with `weight`.
6
+ * @returns The estimated one-repetition maximum.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * lombardi(100, 10);
11
+ * // => 125.89254117941672
12
+ * ```
13
+ */
14
+ export declare function lombardi(weight: number, reps: number): number;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Estimates a one-repetition maximum using Lombardi's formula.
3
+ *
4
+ * @param weight The weight lifted.
5
+ * @param reps The number of repetitions performed with `weight`.
6
+ * @returns The estimated one-repetition maximum.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * lombardi(100, 10);
11
+ * // => 125.89254117941672
12
+ * ```
13
+ */
14
+ export declare function lombardi(weight: number, reps: number): number;
package/dist/index.mjs ADDED
@@ -0,0 +1,18 @@
1
+ // src/index.ts
2
+ /**
3
+ * Estimates a one-repetition maximum using Lombardi's formula.
4
+ *
5
+ * @param weight The weight lifted.
6
+ * @param reps The number of repetitions performed with `weight`.
7
+ * @returns The estimated one-repetition maximum.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * lombardi(100, 10);
12
+ * // => 125.89254117941672
13
+ * ```
14
+ */
15
+ function lombardi(weight, reps) {
16
+ return weight * reps ** .1;
17
+ }
18
+ export { lombardi };
package/package.json CHANGED
@@ -1,39 +1,57 @@
1
1
  {
2
2
  "name": "lombardi",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "Lombardi's formula for one-rep max",
5
5
  "keywords": [
6
6
  "weight-training"
7
7
  ],
8
- "repository": "github:kenany/lombardi",
9
8
  "license": "MIT",
10
9
  "author": "Kenan Yildirim <kenan@kenany.me> (https://kenany.me/)",
11
- "main": "index.js",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/kenany/lombardi.git"
13
+ },
14
+ "type": "commonjs",
15
+ "types": "dist/index.d.cts",
16
+ "main": "dist/index.cjs",
17
+ "exports": {
18
+ ".": {
19
+ "import": "./dist/index.mjs",
20
+ "require": "./dist/index.cjs"
21
+ },
22
+ "./*.mjs": {
23
+ "default": "./dist/*.mjs"
24
+ },
25
+ "./*.cjs": {
26
+ "default": "./dist/*.cjs"
27
+ },
28
+ "./*": {
29
+ "import": "./dist/*.mjs",
30
+ "require": "./dist/*.cjs"
31
+ }
32
+ },
12
33
  "files": [
13
- "index.js",
34
+ "dist",
14
35
  "LICENSE.txt"
15
36
  ],
16
- "directories": {
17
- "test": "test"
18
- },
19
37
  "engines": {
20
- "node": "18 || >=20"
21
- },
22
- "scripts": {
23
- "test": "tape test/index.js",
24
- "posttest": "npm run -s lint",
25
- "lint": "eslint .",
26
- "release": "semantic-release"
38
+ "node": "^22.12.0 || 24 || >=26"
27
39
  },
28
40
  "devDependencies": {
29
- "@kenan/eslint-config": "^11.0.1",
30
- "@semantic-release/changelog": "^6.0.3",
31
- "@semantic-release/git": "^10.0.1",
32
- "almost-equal": "^1.1.0",
33
- "conventional-changelog-conventionalcommits": "^7.0.2",
34
- "eslint": "^8.50.0",
35
- "lodash.isfunction": "^3.0.9",
36
- "semantic-release": "^22.0.5",
37
- "tape": "^5.7.0"
41
+ "@biomejs/biome": "2.6.9",
42
+ "@containerbase/semantic-release-pnpm": "1.4.4",
43
+ "@kenan/biome-config": "1.5.0",
44
+ "conventional-changelog-conventionalcommits": "9.3.1",
45
+ "publint": "0.3.25",
46
+ "semantic-release": "26.0.1",
47
+ "tsdown": "0.23.7",
48
+ "typescript": "7.0.2",
49
+ "vitest": "5.1.2"
50
+ },
51
+ "scripts": {
52
+ "build": "tsdown && tsc --noEmit",
53
+ "lint": "biome check",
54
+ "test": "vitest run",
55
+ "publint": "publint --strict"
38
56
  }
39
- }
57
+ }
package/index.js DELETED
@@ -1,5 +0,0 @@
1
- function lombardi(w, r) {
2
- return w * Math.pow(r, 0.1);
3
- }
4
-
5
- module.exports = lombardi;