{"id":19098683,"url":"https://github.com/bloggify/sequelize-datatable-views","last_synced_at":"2026-03-15T02:34:05.636Z","repository":{"id":74810785,"uuid":"290146950","full_name":"Bloggify/sequelize-datatable-views","owner":"Bloggify","description":"🧮 Visualize Sequelize data in data tables.","archived":false,"fork":false,"pushed_at":"2024-05-13T09:05:09.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-11-23T21:03:38.644Z","etag":null,"topics":["database","datatables","hacktoberfest"],"latest_commit_sha":null,"homepage":"","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/Bloggify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":"ionicabizau","patreon":"ionicabizau","open_collective":"ionicabizau","custom":"https://www.buymeacoffee.com/h96wwchmy"}},"created_at":"2020-08-25T07:35:33.000Z","updated_at":"2024-05-13T09:05:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"86e6e0c8-643c-44c7-971e-2c8b7e131e9d","html_url":"https://github.com/Bloggify/sequelize-datatable-views","commit_stats":{"total_commits":21,"total_committers":2,"mean_commits":10.5,"dds":0.04761904761904767,"last_synced_commit":"4b4d117acc8ee76d3eff03f11c4ba42515f62de3"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Bloggify/sequelize-datatable-views","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bloggify%2Fsequelize-datatable-views","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bloggify%2Fsequelize-datatable-views/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bloggify%2Fsequelize-datatable-views/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bloggify%2Fsequelize-datatable-views/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bloggify","download_url":"https://codeload.github.com/Bloggify/sequelize-datatable-views/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bloggify%2Fsequelize-datatable-views/sbom","scorecard":{"id":22947,"data":{"date":"2025-08-11","repo":{"name":"github.com/Bloggify/sequelize-datatable-views","commit":"51133a890d96e7a6545c0eebd804450dbe7bf968"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/11 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":"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":"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":"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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 23 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"}}]},"last_synced_at":"2025-08-14T17:13:02.841Z","repository_id":74810785,"created_at":"2025-08-14T17:13:02.841Z","updated_at":"2025-08-14T17:13:02.841Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28016994,"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-12-25T02:00:05.988Z","response_time":58,"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","datatables","hacktoberfest"],"created_at":"2024-11-09T03:47:06.120Z","updated_at":"2025-12-25T02:03:37.742Z","avatar_url":"https://github.com/Bloggify.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ionicabizau","https://patreon.com/ionicabizau","https://opencollective.com/ionicabizau","https://www.buymeacoffee.com/h96wwchmy"],"categories":[],"sub_categories":[],"readme":"\u003c!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. --\u003e\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# bloggify-sequelize-datatable-views\n\n [![Version](https://img.shields.io/npm/v/bloggify-sequelize-datatable-views.svg)](https://www.npmjs.com/package/bloggify-sequelize-datatable-views) [![Downloads](https://img.shields.io/npm/dt/bloggify-sequelize-datatable-views.svg)](https://www.npmjs.com/package/bloggify-sequelize-datatable-views)\n\n\n\n\n\n\n\n\u003e Visualize Sequelize data in data tables.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## :cloud: Installation\n\n```sh\n# Using npm\nnpm install --save bloggify-sequelize-datatable-views\n\n# Using yarn\nyarn add bloggify-sequelize-datatable-views\n```\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## :question: Get Help\n\nThere are few ways to get help:\n\n\n\n 1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long you add a link to your Stack Overflow question.\n 2. For bug reports and feature requests, open issues. :bug:\n\n\n\n\n\n\n\n## :memo: Documentation\n\n\n### `bloggifySequelizeDatatableViews()`\nVisualize Sequelize data in data tables.\n\nWhen using this plugin, the `Bloggify.partials.datatable_view` will be\navailable and will require the following parameters:\n\n  - `columns` (Array of Strings): The table headers. If you need special actions, you can pass HTML.\n  - `name` (String): The model name (e.g. `users`)\n  - `type` (String): The table type (`default` | `compact`)\n\n**Example**:\n\n```html\n\u003cdiv class=\"bg-light p-3 rounded mt-5 table-responsive\"\u003e\n    \u003c%\n        include(Bloggify.partials.datatable_view, {\n            columns: [\n                \"ID\",\n                \"Email\",\n                \"First Name\",\n                \"Last Name\",\n                \"Roles\",\n                \"Actions\",\n            ],\n            name: \"users\",\n            type: \"compact\" // or \"default\"\n        })\n    %\u003e\n\u003c/div\u003e\n```\n\n:bulb: Note: You have to initialize the datatables in your own JavaScript code.\n\n### `tableDraw(headers, models, options)`\nGenerates the action to draw the table.\n\n```js\nAssets.tableDraw = Bloggify.services.utils.tableDraw([\n    \"id\",\n    \"serial_number\",\n    \"user.email\",\n    \"file.id\"\n], {\n    base: Bloggify.models.Document,\n    include: [\n        Bloggify.models.File\n      , Bloggify.models.User\n    ]\n}, {\n    searchFields: [\n        \"serial_number\",\n        \"$user.email$\",\n    ],\n    output: [\n        \"id\",\n        \"serial_number\",\n        \"user.email\",\n        // Return null elements if on the client\n        // side you want to have empty columns\n        // populated via JavaScript\n        null, null,\n        // This will resolve into an object with these fields\n        [ \"edit_url\", \"delete_url\" ]\n    ],\n    beforeQuery (ctx, findQuery) {\n       // For example, restrict the results\n       // to a specific user id\n       findQuery.where.userId = ctx.user.id\n    }\n})\n```\n\nThe above will resolve to the following:\n\n```js\n{\n    data: [\n      [\n         42,            // id\n         143,           // serial_number\n         \"foo@bar.com\", // email\n         null,\n         null,\n         {\n             edit_url: \"...\",\n             delete_url: \"...\n         }\n      ]\n    ],\n    draw: \u003ctimestamp\u003e,\n    recordsFiltered: \u003ccount\u003e,\n    recordsTotal: \u003ctotal\u003e\n}\n```\n\n#### Params\n\n- **Array** `headers`: The column names the table has.\n- **Object** `models`: An object containing:\n     - `base` (Model): The base model.\n     - `include` (Array of Models): The models to include (for join).\n- **Object** `options`: Additional querying options:\n     - `searchFields` (Array): The column names you want to enable searching for.\n     - `output` (Array): An array of column names, `null` (for empty output) and array (for object output) elements.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## :yum: How to contribute\nHave an idea? Found a bug? See [how to contribute][contributing].\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## :scroll: License\n\n[MIT][license] © [Bloggify][website]\n\n\n\n\n\n\n[license]: /LICENSE\n[website]: https://bloggify.org\n[contributing]: /CONTRIBUTING.md\n[docs]: /DOCUMENTATION.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloggify%2Fsequelize-datatable-views","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbloggify%2Fsequelize-datatable-views","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloggify%2Fsequelize-datatable-views/lists"}