{"id":16426344,"url":"https://github.com/mlaanderson/database-js-common","last_synced_at":"2026-04-18T02:32:46.592Z","repository":{"id":72379115,"uuid":"146655727","full_name":"mlaanderson/database-js-common","owner":"mlaanderson","description":"Common modules for database-js driver implementations","archived":false,"fork":false,"pushed_at":"2018-10-23T19:24:51.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-14T04:52:59.133Z","etag":null,"topics":["database","database-js","nodejs"],"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/mlaanderson.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":"2018-08-29T20:35:43.000Z","updated_at":"2018-10-23T19:24:53.000Z","dependencies_parsed_at":"2023-12-09T18:45:53.882Z","dependency_job_id":null,"html_url":"https://github.com/mlaanderson/database-js-common","commit_stats":{"total_commits":10,"total_committers":3,"mean_commits":"3.3333333333333335","dds":"0.30000000000000004","last_synced_commit":"e4e114208175abbe286f8e27f321e6e8521b6817"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mlaanderson/database-js-common","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlaanderson%2Fdatabase-js-common","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlaanderson%2Fdatabase-js-common/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlaanderson%2Fdatabase-js-common/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlaanderson%2Fdatabase-js-common/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlaanderson","download_url":"https://codeload.github.com/mlaanderson/database-js-common/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlaanderson%2Fdatabase-js-common/sbom","scorecard":{"id":653063,"data":{"date":"2025-08-11","repo":{"name":"github.com/mlaanderson/database-js-common","commit":"e4e114208175abbe286f8e27f321e6e8521b6817"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"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":"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":"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":"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":"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":"Code-Review","score":2,"reason":"Found 2/10 approved changesets -- score normalized to 2","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":"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":"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h"],"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-21T13:58:36.988Z","repository_id":72379115,"created_at":"2025-08-21T13:58:36.988Z","updated_at":"2025-08-21T13:58:36.988Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31953782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"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":["database","database-js","nodejs"],"created_at":"2024-10-11T08:08:38.816Z","updated_at":"2026-04-18T02:32:46.562Z","avatar_url":"https://github.com/mlaanderson.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# database-js-common\nCommon modules for database-js driver implementations\n\n## About\nThis is a module of useful functions for [database-js](https://github.com/mlaanderson/database-js) driver implementations.\n\n## Usage\n````Javascript\nconst Common = require(\"database-js-common\");\n\n...\nmodule.exports = {\n    open: function(connection) {\n        let params = Common.parseConnectionParams(connection.Parameters);\n        let base = driver.createConnection({\n            host: connection.Hostname || 'localhost',\n            port: parseInt(connection.Port) || 3306,\n            user: connection.Username || 'root',\n            password: connection.Password,\n            database: connection.Database,\n            parameters: params\n        });\n        return new MySQL(base);\n    }\n};\n````\n\n## API\n#### parseConnectionParameters(paramstring: string, parseValues?: boolean = false)\nParses a parameter string of the format key1=value1\u0026key2=value2, optionally converting the string values into appropriate value types. \n\nIf the value types are to be converted, true and false are converted to booleans irrespective of case. Values are converted to numbers if they match the following regex ```/^[-+]?(\\d+\\.)?\\d+(E[-+]?\\d+)?$/i```.\n\nIf you need finer control of value conversions, leave parseValues at false and handle the conversions in your driver code.\n\nIf the driver supports multiple levels to the config object (like the MySQL driver), you can modify the `key` as follows:\n- `key1=value1\u0026key2[subkey1]=value2` yields `{ key1: \"value1\", key2: { subkey1: \"value2\" } }`\n- `key1=value1\u0026key2[subkey1][subsubkey1]=value2` yields `{ key1: \"value1\", key2: { subkey1: { subkey2: \"value2\" } } }`\n- `key1=value1\u0026key2[]=value2` yields `{ key1: \"value1\", key2: [ \"value2\" ] }`\n- `key1=value1\u0026key2[]=value2\u0026key2[]=value3` yields `{ key1: \"value1\", key2: [ \"value2\", \"value3\" ] }`\n- `key1=value1\u0026key2[0]=value2` yields `{ key1: \"value1\", key2: [ \"value2\" ] }`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlaanderson%2Fdatabase-js-common","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlaanderson%2Fdatabase-js-common","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlaanderson%2Fdatabase-js-common/lists"}