{"id":48985259,"url":"https://github.com/backrunner/levelatomic","last_synced_at":"2026-04-18T12:11:06.069Z","repository":{"id":119017692,"uuid":"364343330","full_name":"backrunner/levelatomic","owner":"backrunner","description":"Extend levelup with some atomic methods","archived":false,"fork":false,"pushed_at":"2021-05-05T18:03:07.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-12T18:00:55.795Z","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/backrunner.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":"2021-05-04T18:01:58.000Z","updated_at":"2021-05-07T13:30:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"07c424fa-d560-4dc5-a380-c79b51675a34","html_url":"https://github.com/backrunner/levelatomic","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"9e1bc6b006cdffacc4433eeda5b5c91d5071098f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/backrunner/levelatomic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backrunner%2Flevelatomic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backrunner%2Flevelatomic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backrunner%2Flevelatomic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backrunner%2Flevelatomic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/backrunner","download_url":"https://codeload.github.com/backrunner/levelatomic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backrunner%2Flevelatomic/sbom","scorecard":{"id":222663,"data":{"date":"2025-08-11","repo":{"name":"github.com/backrunner/levelatomic","commit":"9e1bc6b006cdffacc4433eeda5b5c91d5071098f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/8 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":"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":"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":"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"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-17T02:57:31.760Z","repository_id":119017692,"created_at":"2025-08-17T02:57:31.765Z","updated_at":"2025-08-17T02:57:31.765Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31968143,"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":[],"created_at":"2026-04-18T12:11:04.146Z","updated_at":"2026-04-18T12:11:06.063Z","avatar_url":"https://github.com/backrunner.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# levelatomic\n\nThis util will extend [levelup](https://github.com/Level/levelup) instance with some atomic operation methods.\n\n## Usage\n\nFirst of all, install the package from `npm`.\n\n```bash\nnpm install @backrunner/levelatomic\n```\n\nThen wrap your levelup instance like this:\n\n```js\nconst levelatomic = require('@backrunner/levelatomic');\nconst levelup = require('levelup');\nconst leveldown = require('leveldown');\n\nconst db = levelatomic(levelup(leveldown(STORAGE_PATH)));\n```\n\n## API Reference\n\nIn the extended methods, `key` will also be the key for locks, if `key` is not a string, we will use `JSON.stringify` to serialize the key.\n\nAll extended methods only support `Promise`, please use `Promise` to organize your application, not callbacks.\n\n### db.supdate\n\n`db.supdate(key: any, value: any)`\n\nSafely update a data pair in the storage, if the key is not in the database, it will be inserted into the database.\n\n### db.spush\n\n`db.spush(key: any, item: any)`\n\nSafely push an item into an `Array` (JSON serialized) in the storage. Please ensure the value to the key you pass through is an `Array`, if not, the method will throw an error.\n\nAlso, you should ensure that the `item` you passed here is a JSON safe object.\n\nIf database cannot get the stored array, this method will create one.\n\n### db.smerge\n\n`db.smerge(key: any, ...source: Array\u003cobject\u003e)`\n\nSafely merge an object with a stored object, `source` will be deep merged with the stored one.\n\nAll the `source` you passed here should be a JSON safe object, also the value to the key should be a JSON serialized string from an object.\n\n### db.sdel\n\n`db.sdel(key: any, cond: function)`\n\nSafely remove an object, you can pass a function here to judge if the object has been changed, if the `cond` function returns `false`, method will throw an erro with `objChanged` property, the value of the property will be `true`.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackrunner%2Flevelatomic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbackrunner%2Flevelatomic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackrunner%2Flevelatomic/lists"}