{"id":16832656,"url":"https://github.com/zswang/jsets","last_synced_at":"2025-03-18T02:19:11.772Z","repository":{"id":35295069,"uuid":"39556202","full_name":"zswang/jsets","owner":"zswang","description":null,"archived":false,"fork":false,"pushed_at":"2017-11-04T13:41:23.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-24T07:12:14.388Z","etag":null,"topics":["getter","setter"],"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/zswang.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":"2015-07-23T08:46:47.000Z","updated_at":"2017-11-04T03:35:56.000Z","dependencies_parsed_at":"2022-08-04T00:45:21.829Z","dependency_job_id":null,"html_url":"https://github.com/zswang/jsets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zswang%2Fjsets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zswang%2Fjsets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zswang%2Fjsets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zswang%2Fjsets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zswang","download_url":"https://codeload.github.com/zswang/jsets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244141479,"owners_count":20404837,"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":["getter","setter"],"created_at":"2024-10-13T11:49:57.407Z","updated_at":"2025-03-18T02:19:11.751Z","avatar_url":"https://github.com/zswang.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"jsets\n-----------\n\n# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coverage-image]][coverage-url]\n\n\u003e Define Getter and Setter\n\n## Install 安装\n\n```sh\n$ npm install --save jsets\n```\n\n## Usage 使用\n\n```js\nconst jsets = require('jsets')\n\nlet data = {}\nlet instance = {}\ninstance.set = jsets.createSetter(instance, function (name, value) {\n  data[name] = value\n}, true)\ninstance.get = jsets.createGetter(instance, function (name, value) {\n  return data[name]\n}, true)\n\ninstance.set('a', 1)\ninstance.set({\n  a: 1,\n  b: 2\n})\ninstance.get(function (b, a) {\n  console.log(b, a) // 2, 1\n})\n```\n\n## License\n\nMIT © [zswang](http://weibo.com/zswang)\n\n[npm-url]: https://npmjs.org/package/jsets\n[npm-image]: https://badge.fury.io/js/jsets.svg\n[travis-url]: https://travis-ci.org/zswang/jsets\n[travis-image]: https://travis-ci.org/zswang/jsets.svg?branch=master\n[coverage-url]: https://coveralls.io/github/zswang/jsets?branch=master\n[coverage-image]: https://coveralls.io/repos/zswang/jsets/badge.svg?branch=master\u0026service=github","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzswang%2Fjsets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzswang%2Fjsets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzswang%2Fjsets/lists"}