{"id":19335015,"url":"https://github.com/c272/rokkit","last_synced_at":"2026-05-09T07:04:13.582Z","repository":{"id":65491179,"uuid":"131709008","full_name":"c272/rokkit","owner":"c272","description":"A simple JSON database package, using tables and records to emulate more traditional database structures.","archived":false,"fork":false,"pushed_at":"2018-05-03T14:04:14.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-16T21:36:23.527Z","etag":null,"topics":["database","database-management","json","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/c272.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-01T12:10:43.000Z","updated_at":"2018-05-03T14:04:15.000Z","dependencies_parsed_at":"2023-01-25T18:45:24.635Z","dependency_job_id":null,"html_url":"https://github.com/c272/rokkit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/c272/rokkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c272%2Frokkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c272%2Frokkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c272%2Frokkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c272%2Frokkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c272","download_url":"https://codeload.github.com/c272/rokkit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c272%2Frokkit/sbom","scorecard":{"id":260974,"data":{"date":"2025-08-11","repo":{"name":"github.com/c272/rokkit","commit":"6de1ad51d10b094ed54b0371b1d06bb2be0ba310"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"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":"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/18 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":"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":"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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"}}]},"last_synced_at":"2025-08-17T10:49:50.381Z","repository_id":65491179,"created_at":"2025-08-17T10:49:50.381Z","updated_at":"2025-08-17T10:49:50.381Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32810382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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-management","json","nodejs"],"created_at":"2024-11-10T03:04:28.329Z","updated_at":"2026-05-09T07:04:13.567Z","avatar_url":"https://github.com/c272.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rokkit\n*A simple JSON database package, using tables and records to emulate more traditional database structures.*\n\nThis is a really simple JSON database, which allows you to create and delete tables, search whether tables exist, add records and delete records, and more. Extra features are coming in the future to match the other common database solutions. Data in Rokkit is **always persistent**, so whenever you instantiate a new table called \"foo\", all data from previous runtimes' \"foo\" table will be present. All of the database structure is stored in a folder called \"Rokkit\", in the root of your project directory.\n\n**Please note:** This package, by default, automatically syncs properties to file when changed. You can toggle manual syncing by setting `syncOnCommand` to true, and using the `rokkit.sync('tablename', tableobj)` method.\n\n## Example Usage\nAutomatic Syncing:\n\n```\nvar rokkit = require('rokkit'); //adding rokkit\nvar foo = new rokkit.Table('foo'); //creating a new table\n\nfoo.createRecord('bar', 123); //creates a new record called \"bar\"\nconsole.log(foo.bar); //logs \"123\" to console\n\nconsole.log(rokkit.searchTable('foo', 'bar')); //logs \"true\", returns a boolean\nfoo.deleteRecord('bar'); //deletes the \"bar\" record\n\nrokkit.deleteTable('foo'); //deletes the \"foo\" table\nrokkit.tableExists('foo'); //returns false, the table no longer exists\n```\n\nManual Syncing:\n\n```\nvar rokkit = require('rokkit'); //adding rokkit\nrokkit.syncOnCommand = true; //enabling syncOnCommand\n\nvar foo = new rokkit.Table('foo');\nfoo.createRecord('bar', 123);\n\n//At this point, the variable isn't saved to file, only in memory.\n//So, if you search for \"bar\" in the table, it WON'T appear.\nrokkit.searchTable('foo', 'bar'); //returns false\n\nrokkit.sync(\"foo\", foo); //saves the table \"foo\" to file, using the table object foo.\nrokkit.searchTable('foo', 'bar'); //returns true after sync\n```\n\n## Documentation\n### Constructors\n\n**Table**\n\nCreates a new table instance, saving the table to a file of the same name. (eg. creating a table called \"foo\" will save a JSON file with the name \"foo.json\" inside ./rokkit.)\n\nUsage:\n\n`var tablevar = new Table('tablename');`\n\n\n### Methods\n**Table.createRecord**\n\nCreates a record within the table which is being used. For example, using `foo.createRecord('bar', data)` would create a record called \"bar\" in table \"foo\".\n\nUsage:\n\n`tablevar.createRecord('recordname', data);`\n\n---\n\n**Table.deleteRecord**\n \n Deletes an existing record within a table. For example, using `foo.deleteRecord('bar')` would delete the record \"bar\" from table \"foo\".\n\nUsage:\n\n`tablevar.deleteRecord('recordname');`\n\n---\n\n**tableExists**\n\nChecks whether a table exists in the current Rokkit database. For example, using `rokkit.tableExists('foo')` would return true if the table \"foo\" existed on file.\n\nUsage:\n\n`var booleanVariable = rokkit.tableExists('tablename');`\n\n---\n\n**searchTable**\n\nSearches a specific table in the current Rokkit database for a record. For example, using `rokkit.searchTable('foo', 'bar')` would search the table \"foo\" for a record called \"bar\", and return true if a corresponding record was found.\n\nUsage:\n\n`var booleanVariable = rokkit.searchTable('tablename', 'recordname');`\n\n---\n\n**deleteTable**\n\nRemoves a table and all it's records from the current Rokkit database. Attempting to delete a table that does not exist will force an error. For example, using `rokkit.deleteTable('foo')` would remove the table \"foo\" from the database. This is one way, and irrevokable.\n\nUsage:\n\n`rokkit.deleteTable('tablename');`\n\n---\n\n**sync**\n\nSaves a table object currently in memory to the selected table file. Syncing a table with the incorrect file will result in errors, so make sure you're binding the correct table to the correct file with this function. You **must** have syncOnCommand enabled for this to work.\n\nUsage:\n`rokkit.sync('tablename', tableobject);`\n\n### Properties\n**syncOnCommand**\n\nBool, can be set to `true` or `false`. If on, disables automatic table saves, and enables the \"sync\" command, allowing you to save manually.\n\nUsage:\n`rokkit.syncOnCommand = true;`\n\n## Accessing Records\nTo access a record within a table, simply use it like an object. Type the table name, then the record's name following it to use it. If the table \"foo\" had a record called \"bar\", you could access it by using `foo.bar`. The usage is below:\n\nUsage:\n\n`console.log(tablename.recordname);`\n\n## Deprecated Methods\nHere are methods that are contained in previous versions of the projects that have now been deprecated, and are *not present* in the current version. Don't try and use these if you aren't at an older version! Which versions the functions are present in are shown for each method.\n\n**load**\n\nLoads all saved tables into the `rokkit.loadedTables` variable. No constructors are used in this method. For example, if you saved a table called \"foo\", you could load it into memory at the start of runtime by doing `rokkit.load()`, and access the variable by using `rokkit.loadedTables.foo`, followed by any properties.\n\nUsage:\n\n`rokkit.load();`\n\nReason for Deprecation:\n\nNames of variables became way too long, have now switched the package to constructors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc272%2Frokkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc272%2Frokkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc272%2Frokkit/lists"}