remote-work-calculator 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 (3) hide show
  1. package/LICENSE +21 -0
  2. package/index.js +31 -0
  3. package/package.json +25 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 flat.social
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/index.js ADDED
@@ -0,0 +1,31 @@
1
+ const comparisons = [
2
+ { label: "Complete a Master's degree", hours: 2400 },
3
+ { label: "Travel to the Moon (Apollo 11 flight time)", hours: 76 },
4
+ { label: "Learn a new language to fluency", hours: 1100 },
5
+ { label: "Read 200 books", hours: 1200 },
6
+ { label: "Run 100 marathons", hours: 500 },
7
+ { label: "Watch every Marvel movie 10 times", hours: 500 },
8
+ { label: "Fly around the world 20 times", hours: 900 },
9
+ { label: "Cook 5,000 meals from scratch", hours: 2500 },
10
+ { label: "Hike the entire Appalachian Trail 3 times", hours: 1800 },
11
+ ];
12
+
13
+ function calculate({ minutesPerDay = 60, daysPerWeek = 5, weeksPerYear = 48 } = {}) {
14
+ const hoursPerWeek = (minutesPerDay * daysPerWeek) / 60;
15
+ const hoursPerMonth = hoursPerWeek * 4.33;
16
+ const hoursPerYear = hoursPerWeek * weeksPerYear;
17
+ const hoursPerDecade = hoursPerYear * 10;
18
+
19
+ return {
20
+ hoursPerWeek: Math.round(hoursPerWeek * 10) / 10,
21
+ hoursPerMonth: Math.round(hoursPerMonth),
22
+ hoursPerYear: Math.round(hoursPerYear),
23
+ hoursPerDecade: Math.round(hoursPerDecade),
24
+ comparisons: comparisons.map((c) => ({
25
+ ...c,
26
+ times: Math.round((hoursPerDecade / c.hours) * 10) / 10,
27
+ })),
28
+ };
29
+ }
30
+
31
+ module.exports = { calculate, comparisons };
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "remote-work-calculator",
3
+ "version": "1.0.0",
4
+ "description": "Calculate how much time you lose commuting — and what you could do with it instead.",
5
+ "main": "index.js",
6
+ "homepage": "https://flat.social",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/nicedoc/remote-work-calculator"
10
+ },
11
+ "keywords": [
12
+ "remote-work",
13
+ "commute",
14
+ "calculator",
15
+ "productivity",
16
+ "time-savings",
17
+ "work-from-home"
18
+ ],
19
+ "license": "MIT",
20
+ "author": "flat.social <hello@flat.social>",
21
+ "files": [
22
+ "index.js",
23
+ "LICENSE"
24
+ ]
25
+ }