{"id":23108618,"url":"https://github.com/venryx/node-edf","last_synced_at":"2025-08-16T17:32:45.462Z","repository":{"id":65460486,"uuid":"318676866","full_name":"Venryx/node-edf","owner":"Venryx","description":"NodeJS library for reading and writing EDF files. (WIP)","archived":false,"fork":false,"pushed_at":"2020-12-05T18:53:17.000Z","size":41,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-16T09:43:33.207Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Venryx.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}},"created_at":"2020-12-05T01:36:39.000Z","updated_at":"2025-04-07T18:30:16.000Z","dependencies_parsed_at":"2023-01-24T14:45:26.229Z","dependency_job_id":null,"html_url":"https://github.com/Venryx/node-edf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Venryx/node-edf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Venryx%2Fnode-edf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Venryx%2Fnode-edf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Venryx%2Fnode-edf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Venryx%2Fnode-edf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Venryx","download_url":"https://codeload.github.com/Venryx/node-edf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Venryx%2Fnode-edf/sbom","scorecard":{"id":147617,"data":{"date":"2025-08-11","repo":{"name":"github.com/Venryx/node-edf","commit":"ec94f29487b7dc556752f7d21e33371831f7b607"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/9 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"15 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T09:42:57.905Z","repository_id":65460486,"created_at":"2025-08-16T09:42:57.905Z","updated_at":"2025-08-16T09:42:57.905Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270746676,"owners_count":24638391,"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","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-17T01:28:35.483Z","updated_at":"2025-08-16T17:32:45.213Z","avatar_url":"https://github.com/Venryx.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node EDF\n\nNodeJS library for reading and writing EDF files.\n\nNote: Only EDF writing/serializing is implemented atm. For EDF reading/parsing, consider:\n* https://github.com/Pixpipe/edfdecoder\n* https://github.com/jusjusjus/edfjs\n* https://github.com/Pixpipe/edfdecoder\n* https://github.com/korob93/edf-node\n\n### Installation\n\n```\nnpm install node-edf --save-exact\n```\n\nThe `--save-exact` flag is recommended (to disable version-extending), since this package uses [Explicit Versioning](https://medium.com/sapioit/why-having-3-numbers-in-the-version-name-is-bad-92fc1f6bc73c) (`Release.Breaking.FeatureOrFix`) rather than SemVer (`Breaking.Feature.Fix`).\n\nFor `FeatureOrFix` version-extending (recommended for libraries), prepend \"`~`\" in `package.json`. (for `Breaking`, prepend \"`^`\")\n\n### Usage\n\n```\nimport {EDFPackage, WriteEDFHeader, WriteEDFPackage, AppendChunk, ChannelInfo, Chunk} from \"node-edf\";\nimport paths from \"path\";\n\nfunction ExportNightEEGData(sessionFolderName: string, exportChannelsInOneFile = true) {\n\tconst path = GetSessionFolderPath(sessionFolderName); // project-specific\n\tconsole.log(`Starting export of session: ${sessionFolderName}`);\n\t\n\t// project-specific\n\tconst sessionInfo = JSON.parse(ReadFileTextSync_Safe(paths.join(path, \"SessionInfo.json\")) ?? `{}`)\n\tconst data = {\n\t\tForehead_Left: new Float32Array(GetEEGSamples(\"EEG_Forehead_Left.json\")),\n\t\tForehead_Right: new Float32Array(GetEEGSamples(\"EEG_Forehead_Right.json\")),\n\t\tEar_Left: new Float32Array(GetEEGSamples(\"EEG_Ear_Left.json\")),\n\t\tEar_Right: new Float32Array(GetEEGSamples(\"EEG_Ear_Right.json\")),\n\t};\n\n\tif (exportChannelsInOneFile) {\n\t\tconst exportFolder = GetSessionSubPath(sessionFolderName, \"Export_SleepApp\"); // project-specific\n\t\tfs.mkdirSync(exportFolder, {recursive: true}); // marked recursive, just so doesn't error if folder already exists\n\n\t\tconst pack = new EDFPackage({\n\t\t\tpatientID: \"User_Unknown\",\n\t\t\trecordingID: `Folder_${sessionFolderName}`,\n\t\t\tstartTime: sessionInfo.startTime,\n\t\t\tchunkDuration: 30, // 30 seconds per chunk\n\t\t\tchannelInfos: [\n\t\t\t\tCreateChannelInfo({name: \"Forehead_Left\"}),\n\t\t\t\tCreateChannelInfo({name: \"Forehead_Right\"}),\n\t\t\t\tCreateChannelInfo({name: \"Ear_Left\"}),\n\t\t\t\tCreateChannelInfo({name: \"Ear_Right\"}),\n\t\t\t],\n\t\t\tchunks: [],\n\t\t});\n\n\t\tconst stream = fs.createWriteStream(paths.join(exportFolder, \"EEGData.edf\"));\n\t\t//WriteEDFHeader(pack, stream);\n\n\t\tconst samplesPerChunk = pack.channelInfos[0].sampleCountPerChunk;\n\t\tfor (let chunkI = 0; ; chunkI++) {\n\t\t\tconst sampleStartI = chunkI * samplesPerChunk;\n\t\t\tconst sampleEndI = sampleStartI + samplesPerChunk;\n\t\t\tif (sampleEndI \u003e= data.Ear_Left.length) break;\n\n\t\t\tconst channelSamples = [] as number[][];\n\t\t\tfor (const channel of pack.channelInfos) {\n\t\t\t\tconst samplesForThisChannel = [] as number[];\n\t\t\t\tfor (let i = sampleStartI; i \u003c sampleEndI; i++) {\n\t\t\t\t\tsamplesForThisChannel.push(data[channel.name][i]);\n\t\t\t\t}\n\t\t\t\tchannelSamples.push(samplesForThisChannel);\n\t\t\t}\n\t\t\tconst chunk = new Chunk({\n\t\t\t\tchannelSamples,\n\t\t\t});\n\t\t\tpack.chunks.push(chunk);\n\n\t\t\t//AppendChunk(chunk, stream, pack.channelInfos);\n\t\t\tconsole.log(`Wrote chunk ${chunkI}.`);\n\t\t}\n\n\t\tWriteEDFPackage(pack, stream);\n\t\tstream.close();\n\t} else {\n\t\t// channel-per-file exporting example not yet written\n\t}\n}\n\nfunction CreateChannelInfo(data: Partial\u003cChannelInfo\u003e) {\n\tconst data_final = Object.assign(\n\t\t{\n\t\t\ttype: \"MuseS\",\n\t\t\tdimensions: \"unknown\",\n\t\t\tphysicalMin: -32768,\n\t\t\tphysicalMax: 32767,\n\t\t\tdigitalMin: -1000,\n\t\t\tdigitalMax: 1000,\n\t\t\tprefilteringInfo: \"unknown\",\n\t\t\tsampleCountPerChunk: 256 * 30,\n\t\t},\n\t\tdata,\n\t);\n\treturn new ChannelInfo(data_final);\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenryx%2Fnode-edf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvenryx%2Fnode-edf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenryx%2Fnode-edf/lists"}