{"id":30754184,"url":"https://github.com/sdgluck/objecthistory","last_synced_at":"2025-09-04T09:08:14.080Z","repository":{"id":57312880,"uuid":"84680981","full_name":"sdgluck/objecthistory","owner":"sdgluck","description":":four_leaf_clover: Object undo, redo \u0026 change history using Proxies","archived":false,"fork":false,"pushed_at":"2017-03-13T15:22:45.000Z","size":13,"stargazers_count":57,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-17T08:21:06.527Z","etag":null,"topics":["es2015-modules","javascript","javascript-proxy"],"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/sdgluck.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":"2017-03-11T21:27:44.000Z","updated_at":"2024-02-08T19:41:53.000Z","dependencies_parsed_at":"2022-09-20T23:02:44.583Z","dependency_job_id":null,"html_url":"https://github.com/sdgluck/objecthistory","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sdgluck/objecthistory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdgluck%2Fobjecthistory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdgluck%2Fobjecthistory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdgluck%2Fobjecthistory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdgluck%2Fobjecthistory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sdgluck","download_url":"https://codeload.github.com/sdgluck/objecthistory/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdgluck%2Fobjecthistory/sbom","scorecard":{"id":807038,"data":{"date":"2025-08-11","repo":{"name":"github.com/sdgluck/objecthistory","commit":"cb6b794e1c78d20bf9eec7e45939125794851dde"},"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":"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/13 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":"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":"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":"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"}}]},"last_synced_at":"2025-08-23T12:04:39.001Z","repository_id":57312880,"created_at":"2025-08-23T12:04:39.001Z","updated_at":"2025-08-23T12:04:39.001Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273581224,"owners_count":25131393,"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-09-04T02:00:08.968Z","response_time":61,"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":["es2015-modules","javascript","javascript-proxy"],"created_at":"2025-09-04T09:06:58.337Z","updated_at":"2025-09-04T09:08:14.059Z","avatar_url":"https://github.com/sdgluck.png","language":"JavaScript","funding_links":[],"categories":["Proxy Resources"],"sub_categories":["Modules"],"readme":"\u003ch1\u003eobjecthistory\u003c/h1\u003e\n\n\u003ca href=\"http://badge.fury.io/js/objecthistory\"\u003e\u003cimg alt=\"npm version\" src=\"https://badge.fury.io/js/objecthistory.svg\" /\u003e\u003c/a\u003e\n\n❤ Made at \u003ca href=\"http://www.twitter.com/outlandish\"\u003e@outlandish\u003c/a\u003e\n\n:four_leaf_clover: Simple undo and redo for objects.\n\n:point_right: Use your preferred bundler and transpiler as required.\n\n## Example\n\n```js\nconst input = history({ value: '' })\n\ninput.value = 'Ziggy'\ninput.value = 'Stardust'\n\ninput.$$index //=\u003e 2\ninput.$$history() //=\u003e [{ value: '' }, { value: 'Ziggy' }]\n\ninput.$$undo()\ninput.$$index //=\u003e 1\ninput.value //=\u003e 'Ziggy'\n\ninput.$$redo()\ninput.$$index //=\u003e 2\ninput.value //=\u003e 'Stardust'\n```\n\n## Install\n\n```sh\nnpm install --save objecthistory\n```\n\n```sh\nyarn add objecthistory\n```\n\n## Import\n\n```js\n// ES2015\nimport history from 'objecthistory'\n```\n\n```js\n// CommonJS\nvar history = require('objecthistory')\n```\n\n## Usage\n\n### `history([obj]) : Object`\n\nEnhance an object with undo, redo \u0026 change history.\n\n- [__obj__] {Object} _(optional, default=`{}`)_ Object to enhance\n\nReturns enhanced object.\n \n## API\n\nAn enhanced object has the following methods.\n\n### `obj.$$index : Number`\n\nThe current position of the object in the history of changes, which represents the current value of the object. \n\n- An `undo` moves the cursor backwards in the history.\n\n- A `redo` moves the cursor forwards in the history.\n\n- Any forward history is lost when a new change is made.\n\n### `obj.$$undo([n]) : Object`\n\nUndo `n` changes to the object.\n\n- [__n__] {Number} _(optional, default=`1`)_ Number of redos to apply\n\n### `obj.$$redo([n]) : Object`\n\nRe-apply `n` undone changes to the object.\n\n- [__n__] {Number} _(optional, default=`1`)_ Number of redos to apply\n\n### `obj.$$history([n]) : Array`\n\nGet an array of `n` history items.\n\n- [__n__] {Number} _(optional, default=`Infinity`)_ Number of history items to retrieve\n\n### `obj.$$historyBackward([n]) : Array`\n\nGet an array of `n` history items before `$$index`.\n\n- [__n__] {Number} _(optional, default=`Infinity`)_ Number of history items to retrieve\n\n### `obj.$$historyForward([n]) : Array`\n\nGet an array of `n` history items after `$$index`.\n\n- [__n__] {Number} _(optional, default=`Infinity`)_ Number of history items to retrieve\n\n## Contributing\n\nAll pull requests and issues welcome!\n\nIf you're not sure how, check out the [great video tutorials on egghead.io](http://bit.ly/2aVzthz)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdgluck%2Fobjecthistory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsdgluck%2Fobjecthistory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdgluck%2Fobjecthistory/lists"}