lombardi 1.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/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2015 Kenan Yildirim <http://kenany.me/>
1
+ Copyright 2015–2023 Kenan Yildirim <https://kenany.me/>
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of
4
4
  this software and associated documentation files (the "Software"), to deal in
package/README.md CHANGED
@@ -1,39 +1,31 @@
1
1
  # lombardi
2
2
 
3
- [![Build Status][travis-svg]][travis]
4
- [![Dependency Status][gemnasium-svg]][gemnasium]
5
-
6
3
  [Lombardi's formula][1] for one-repetition maximum.
7
4
 
8
5
  ## Example
9
6
 
10
- ``` javascript
11
- var lombardi = require('lombardi');
7
+ ```javascript
8
+ import { lombardi } from 'lombardi';
12
9
 
13
10
  lombardi(100, 10);
14
- // => 125
11
+ // => 125.89254117941672
15
12
  ```
16
13
 
17
14
  ## Installation
18
15
 
19
- ``` bash
16
+ ```bash
20
17
  $ npm install lombardi
21
18
  ```
22
19
 
23
20
  ## API
24
21
 
25
- ``` javascript
26
- var lombardi = require('lombardi');
22
+ ```javascript
23
+ import { lombardi } from 'lombardi';
27
24
  ```
28
25
 
29
- ### `lombardi(weight, reps)`
26
+ ### `lombardi(weight: number, reps: number)`
30
27
 
31
28
  Given _Number_ `weight` and _Number_ `reps`, returns the one-repetition maximum
32
29
  from Lombardi's formula as a _Number_.
33
30
 
34
-
35
31
  [1]: https://en.wikipedia.org/wiki/One-repetition_maximum#Lombardi
36
- [travis]: https://travis-ci.org/KenanY/lombardi
37
- [travis-svg]: https://img.shields.io/travis/KenanY/lombardi.svg
38
- [gemnasium]: https://gemnasium.com/KenanY/lombardi
39
- [gemnasium-svg]: https://img.shields.io/gemnasium/KenanY/lombardi.svg
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,27 +1,57 @@
1
1
  {
2
2
  "name": "lombardi",
3
- "version": "1.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": "KenanY/lombardi",
9
8
  "license": "MIT",
10
- "author": "Kenan Yildirim <kenan@kenany.me> (http://kenany.me/)",
11
- "main": "index.js",
9
+ "author": "Kenan Yildirim <kenan@kenany.me> (https://kenany.me/)",
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
- "scripts": {
20
- "test": "tape test/index.js"
37
+ "engines": {
38
+ "node": "^22.12.0 || 24 || >=26"
21
39
  },
22
40
  "devDependencies": {
23
- "almost-equal": "0.0.0",
24
- "lodash.isfunction": "^3.0.1",
25
- "tape": "^3.5.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"
26
56
  }
27
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;