{"id":20206275,"url":"https://github.com/c0stra/kiss.js","last_synced_at":"2026-04-21T03:32:58.218Z","repository":{"id":37591215,"uuid":"490824762","full_name":"c0stra/kiss.js","owner":"c0stra","description":"Keep It Simple... pure javascript MVC library","archived":false,"fork":false,"pushed_at":"2023-01-03T09:01:03.000Z","size":142,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T09:43:17.607Z","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":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/c0stra.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":"2022-05-10T18:56:57.000Z","updated_at":"2022-05-22T20:41:19.000Z","dependencies_parsed_at":"2023-02-01T05:46:06.608Z","dependency_job_id":null,"html_url":"https://github.com/c0stra/kiss.js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/c0stra/kiss.js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0stra%2Fkiss.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0stra%2Fkiss.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0stra%2Fkiss.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0stra%2Fkiss.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c0stra","download_url":"https://codeload.github.com/c0stra/kiss.js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0stra%2Fkiss.js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32075241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T02:38:07.213Z","status":"ssl_error","status_checked_at":"2026-04-21T02:38:06.559Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-11-14T05:22:42.298Z","updated_at":"2026-04-21T03:32:58.201Z","avatar_url":"https://github.com/c0stra.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kiss.js\n\u003e Keep It Simple... pure javascript MVC library\n\nKiss.js is client side only, EcmaScript 6 based\nstrict MVC implementation.\n\nIt's an early stage of development, now containing\nrather low level components, with the plan to build\nfully featured GUI toolkit.\n\nThe main theme is strict separation of models and\nviews, complemented by tiny glues - commands.\n\n## Models\nCurrently there are just two, but powerful models.\n\n```\nXValue\n```\nModel of simple value.\nThere are no restrictions on the type, so it can\nserve many different purposes. Holding e.g. value\nto be displayed somewhere in the page (and updated\nwhen changed), but also with boolean values as a\ntoggle used for changing state of various GUI\ncontrols, but big power comes with connecting value\nmodels using functions.\n\n```\nXProducer\n```\nModel of dynamically added elements (e.g. table\nrows).\nE.g. model of list extends it.\n\n## Views\nCurrently view layer is pretty low level. It's\nabout building dynamic HTML content using javascript\nfluent builders.\nThe power is in connection of the builders with\nmodels very easilly.\n\n## Examples\nExanple of simple updatable value:\n```\nlet model = textModel('Initializing')\nbody().add(div().add(model))\n```\nImmediately, on change of the value in model by\n `model.set('Done')`, the disolayed value changes.\n\nExample of control of hideable element:\n```\nlet displayToggle = booleanModel() // default initual value is `false`\nbody().add(\n    div().add('Click for details').onClick(toggle(disolayToggle)),\n    div().add('Detail hiddeable').display(displayToggle)\n)\n```\nThe html builder method `display()` normally sets the\ncss style property `display`, but in this example it\naccepts directly the boolean model, so if it's `false`,\nthe element wont be visible.\n\nBuilder methods for attributes and style properties\naccept vararg parameters. If more arguments provided,\nthe meaning is - model function to concatenate the\narguments.\nThis brings a powerful feature, when one wants to\ndynamically control part of the value.\nTypical usecase is to switch or toggle a css class,\nbut at the same time keep others unchanged.\n\nExample:\n```\nlet toggleClass = booleanModel()\n\nbody().add(\n    div().setClass('fixed', mapBooleanModel(toggleClass, ' on')).add('Some text')\n)\n```\nThis code will toggle the class `on`, so it will be there, or not.\nIf the mapping receives one more argumen, it will switch\nbetween them.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc0stra%2Fkiss.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc0stra%2Fkiss.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc0stra%2Fkiss.js/lists"}