{"id":22933990,"url":"https://github.com/atypicalim/pure-js-tools","last_synced_at":"2025-04-01T18:28:45.402Z","repository":{"id":53926641,"uuid":"458263820","full_name":"Atypicalim/pure-js-tools","owner":"Atypicalim","description":"pure js tools like template, query, markdown ...","archived":false,"fork":false,"pushed_at":"2024-07-24T17:17:20.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T12:14:09.634Z","etag":null,"topics":["javascript","js","template"],"latest_commit_sha":null,"homepage":"","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/Atypicalim.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-11T16:37:54.000Z","updated_at":"2024-07-24T17:17:23.000Z","dependencies_parsed_at":"2024-07-24T19:48:37.534Z","dependency_job_id":"2cd3b8b5-f081-4649-8ace-1df52ce03e5c","html_url":"https://github.com/Atypicalim/pure-js-tools","commit_stats":null,"previous_names":["atypicalim/pure-js-tools"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atypicalim%2Fpure-js-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atypicalim%2Fpure-js-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atypicalim%2Fpure-js-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atypicalim%2Fpure-js-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Atypicalim","download_url":"https://codeload.github.com/Atypicalim/pure-js-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246690923,"owners_count":20818425,"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":["javascript","js","template"],"created_at":"2024-12-14T11:37:05.458Z","updated_at":"2025-04-01T18:28:45.384Z","avatar_url":"https://github.com/Atypicalim.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Pure JS Tools\r\n\r\n0. About\r\n\r\n\u003e there are some useful tools for js, u can link them with script tag and enjoy the tools ...\r\n\r\n1. template\r\n\r\n```javascript\r\nvar template = `template test, hello \u003c% this.name %\u003e ...`;\r\nvar renderer = template2renderer(template);\r\nvar html = renderer({name: \"someone\",});\r\nconsole.log(html);\r\n// template test, hello someone ...\r\n```\r\n\r\n2. query\r\n\r\n```javascript\r\nvar $ = query2selector();\r\nvar obj = $(\"div\");\r\nobj.style(\"color\", \"blue\");\r\n```\r\n\r\n3. markdown\r\n\r\n```javascript\r\nvar mark = \"## title text\";\r\nvar html = markdown2html(mark);\r\nconsole.log(html);\r\n// \u003ch2\u003etitle text\u003c/h2\u003e\r\n```\r\n\r\n4. style\r\n\r\n```javascript\r\nvar style = {\r\n    color: \"{0}\",\r\n    font_size: \"{1}px\",\r\n}\r\nlet renderer = style2renderer(style);\r\nlet text = renderer(\"#00ff00\", 16);\r\nconsole.log(text);\r\n// color: #00ff00; font-size: 16px\r\n```\r\n\r\n5. State\r\n\r\n```javascript\r\nlet state = new State((prxy, isWrite, key) =\u003e {\r\n    console.log(\"changed:\", isWrite, key);\r\n})\r\nlet proxy = state({\r\n    a: \"aaa\",\r\n    b: {c: \"ccc\"}\r\n});\r\nconsole.log(\"before:\", proxy.b.c());\r\nproxy.b.c = \"c...\"\r\nconsole.log(\"after:\", proxy.b.c());\r\n// changed: false b.c\r\n// before: ccc\r\n// changed: true b.c\r\n// changed: false b.c\r\n// after: c...\r\n```\r\n\r\n---\r\n\r\n\u003e for more feture plz read the source code ...\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatypicalim%2Fpure-js-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatypicalim%2Fpure-js-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatypicalim%2Fpure-js-tools/lists"}