{"id":27048644,"url":"https://github.com/default-writer/lazyeval","last_synced_at":"2025-06-28T08:32:23.632Z","repository":{"id":135937926,"uuid":"143162299","full_name":"default-writer/lazyeval","owner":"default-writer","description":"Minimalist Lazy Evaluation JavaSctipt famework","archived":false,"fork":false,"pushed_at":"2022-07-21T07:30:51.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-05T07:15:25.797Z","etag":null,"topics":[],"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/default-writer.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}},"created_at":"2018-08-01T13:48:31.000Z","updated_at":"2019-04-14T09:34:26.000Z","dependencies_parsed_at":"2023-07-18T15:57:11.561Z","dependency_job_id":null,"html_url":"https://github.com/default-writer/lazyeval","commit_stats":null,"previous_names":["hack2root/lazyeval"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/default-writer/lazyeval","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/default-writer%2Flazyeval","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/default-writer%2Flazyeval/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/default-writer%2Flazyeval/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/default-writer%2Flazyeval/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/default-writer","download_url":"https://codeload.github.com/default-writer/lazyeval/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/default-writer%2Flazyeval/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262400758,"owners_count":23305360,"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","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":"2025-04-05T07:15:27.716Z","updated_at":"2025-06-28T08:32:23.614Z","avatar_url":"https://github.com/default-writer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lazyeval\nMinimalist Lazy Evaluation JavaSctipt famework\n\n```js\nlet lazy = (eval) =\u003e ((data) =\u003e new Proxy(data, {\n  set(obj, key, val) {\n      obj[key] = val;\n      eval(obj);\n  }\n}))({});\n```\n\nhttps://github.com/hack2root/lazyeval\n\n[![install size](https://packagephobia.now.sh/badge?p=@root_admin/lazyeval@1.0.1)](https://packagephobia.now.sh/result?p=@root_admin/lazyeval@1.0.1)\n\n## Example\n\n- func is a proxy for an empty objct {}\n- func calls evaluation function every time you write to existing, new or user defined properties\n- func updates internal object and passes it as an argument for every call to evaluation function\n- f is a parameter pointing to the internal representation of the external object {}\n- c is not evaluated until all requirements for evaluation is met for evaluation function\n\n```js\ndescribe('let func = lazy((f) =\u003e { if (f.a \u0026\u0026 f.b) { c = f.a + f.b } })', function () {\n  it('should add two numbers', function () {\n\n    // 1. ARRANGE\n    let a = 1;\n    let b = 2;\n    let c;\n\n    // 2. ACT\n    let func = lazy((f) =\u003e {\n      if (f.a \u0026\u0026 f.b) { \n        c = f.a + f.b \n      }\n    });\n\n    func.a = a;\n    func.b = b;\n\n    // 3. ASSERT\n    expect(c).to.be.equal(3);\n  });\n});\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefault-writer%2Flazyeval","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefault-writer%2Flazyeval","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefault-writer%2Flazyeval/lists"}