{"id":18079181,"url":"https://github.com/pierremtb/easy-fit","last_synced_at":"2025-04-10T03:50:37.819Z","repository":{"id":57218462,"uuid":"58918236","full_name":"pierremtb/easy-fit","owner":"pierremtb","description":"Parse your .FIT files easily, directly from JS","archived":false,"fork":false,"pushed_at":"2023-11-23T08:37:15.000Z","size":772,"stargazers_count":72,"open_issues_count":14,"forks_count":57,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-03T02:11:15.210Z","etag":null,"topics":["es6-javascript","fitness","sports","wearables"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pierremtb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-16T08:59:36.000Z","updated_at":"2025-02-18T08:42:47.000Z","dependencies_parsed_at":"2024-06-18T21:32:42.301Z","dependency_job_id":"fa32ddae-15cb-40da-b776-ef0f8d5b9ce6","html_url":"https://github.com/pierremtb/easy-fit","commit_stats":{"total_commits":35,"total_committers":6,"mean_commits":5.833333333333333,"dds":0.2857142857142857,"last_synced_commit":"7d988fff8800f642c2e7cebbb3bdfc756e8c6fa5"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierremtb%2Feasy-fit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierremtb%2Feasy-fit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierremtb%2Feasy-fit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierremtb%2Feasy-fit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pierremtb","download_url":"https://codeload.github.com/pierremtb/easy-fit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154999,"owners_count":21056542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["es6-javascript","fitness","sports","wearables"],"created_at":"2024-10-31T12:24:06.193Z","updated_at":"2025-04-10T03:50:37.794Z","avatar_url":"https://github.com/pierremtb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"NOTE: this lib is currently being rewritten in a [new repository](https://github.com/backfit/backfit).\n\n# easy-fit\n\n\u003e Parse your .FIT files easily, directly from JS.\n\u003e Written in ES6.\n\n\n## Install\n\n```\n$ npm install easy-fit --save\n```\n\n## How to use\n\nSee in [examples](./examples) folder:\n\n```javascript\n// Require the module\nvar EasyFit = require('./../dist/easy-fit.js').default;\n\n// Read a .FIT file\nvar fs = require('fs');\nfs.readFile('./example.fit', function (err, content) {\n\n  // Create a EasyFit instance (options argument is optional)\n  var easyFit = new EasyFit({\n    force: true,\n    speedUnit: 'km/h',\n    lengthUnit: 'km',\n    temperatureUnit: 'kelvin',\n    elapsedRecordField: true,\n    mode: 'cascade',\n  });\n  \n  // Parse your file\n  easyFit.parse(content, function (error, data) {\n  \n    // Handle result of parse method\n    if (error) {\n      console.log(error);\n    } else {\n      console.log(JSON.stringify(data));\n    }\n    \n  });\n  \n});\n```\n\n## API Documentation\n### new EasyFit(Object _options_)\nNeeded to create a new instance. _options_ is optional, and is used to customize the returned object.\n\nAllowed properties :\n- `mode`: String\n  - `cascade`: Returned object is organized as a tree, eg. each lap contains a `records` fields, that is an array of its records (**default**)\n  - `list`: Returned object is organized as lists of sessions, laps, records, etc..., without parent-child relation\n  - `both`: A mix of the two other modes, eg. `records` are available inside the root field as well as inside each laps\n- `lengthUnit`: String\n  - `m`: Lengths are in meters (**default**)\n  - `km`: Lengths are in kilometers\n  - `mi`: Lengths are in miles\n- `temperatureUnit`: String\n  - `celsius`:Temperatures are in °C (**default**)\n  - `kelvin`: Temperatures are in °K\n  - `farhenheit`: Temperatures are in °F\n- `speedUnit`: String\n  - `m/s`: Speeds are in meters per seconds (**default**)\n  - `km/h`: Speeds are in kilometers per hour\n  - `mph`: Speeds are in miles per hour\n- `force`: Boolean\n  - `true`: Continues even if they are errors (**default for now**)\n  - `false`: Stops if an error occurs\n- `elapsedRecordField`: Boolean\n  - `true`: Includes a `elapsed_time` field inside each `record` field, containing the elapsed time in seconds since the first record (**default**)\n  - `false`\n\n### easyFit.parse(Buffer _file_, Function _callback_)\n_callback_ receives two arguments, the first as a error String, and the second as Object, result of parsing.\n\n## Contributors\n\nBig thanks to [Mikael Lofjärd](https://github.com/mlofjard) for [his early prototype](https://github.com/mlofjard/jsonfit).\nSee [CONTRIBUTORS](./CONTRIBUTORS.md).\n\n## License\n\nMIT license; see [LICENSE](./LICENSE).\n\n(c) 2016 by Pierre Jacquier\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpierremtb%2Feasy-fit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpierremtb%2Feasy-fit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpierremtb%2Feasy-fit/lists"}