{"id":19079023,"url":"https://github.com/tomtom/prototype_vim","last_synced_at":"2026-02-28T19:32:40.200Z","repository":{"id":66582404,"uuid":"833901","full_name":"tomtom/prototype_vim","owner":"tomtom","description":"Simple JavaScript-like prototype-based programming in vimscript","archived":false,"fork":false,"pushed_at":"2013-10-20T14:38:43.000Z","size":112,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-22T05:27:56.291Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"VimL","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/tomtom.png","metadata":{"files":{"readme":"README","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}},"created_at":"2010-08-12T16:48:06.000Z","updated_at":"2019-01-07T00:20:28.000Z","dependencies_parsed_at":"2023-02-20T07:15:40.614Z","dependency_job_id":null,"html_url":"https://github.com/tomtom/prototype_vim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tomtom/prototype_vim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Fprototype_vim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Fprototype_vim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Fprototype_vim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Fprototype_vim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomtom","download_url":"https://codeload.github.com/tomtom/prototype_vim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Fprototype_vim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29948883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T18:42:55.706Z","status":"ssl_error","status_checked_at":"2026-02-28T18:42:48.811Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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-09T02:13:05.694Z","updated_at":"2026-02-28T19:32:40.179Z","avatar_url":"https://github.com/tomtom.png","language":"VimL","funding_links":[],"categories":[],"sub_categories":[],"readme":"prototype leverages vimscript's |dictionary-function|s to enable \nJavaScript-like prototype-based programming.\n\nExample: \u003e\n\n    \" Define a prototype\n    let x1 = prototype#New({'a': 2, 'b': 3})\n    function! x1.Foo(a) dict \"{{{3\n        return \"x1-\". (self.a * a:a)\n    endf\n    echo x1.Foo(10)\n    =\u003e x1-20\n\n    \" Inherit from a prototype\n    let x2 = prototype#New({'a': 33}, x1)\n    echo x2.Foo(10)\n    =\u003e x1-330\n\n    echo x2.b\n    =\u003e 3\n\n    \" Change the prototype\n    let x1a = prototype#New({'a': 20, 'b': 30, 'c': 50})\n    function! x1a.Foo(a) dict \"{{{3\n        return \"x1a-\". (self.c * a:a)\n    endf\n    call x2.__Prototype(x1a)\n    echo x2.Foo(10)\n    =\u003e x1a-500\n\nSee ../spec/prototype/prototype.vim for more examples.\n\n\n                                                    *prototype-objects*\nObjects~\n\nObjects are created created with the |prototype#New()| function. Strict \nobjects whose validity is checked on certain operations can be created \nwith |prototype#strict#New()|.\n\nExample: \u003e\n\n    let o = prototype#New({'a': 1, 'b': 2})\n    function! o.Foo(x) dict\n        return self.a * a:x\n    endf\n\nAn object has the following additional fields and method(s):\n\n    o.__Prototype(prototype) ... Set the prototype\n    o.__prototype            ... Access the prototype\n    o.__Get(key, [default])  ... Get key's value, call \n                                 o.__Default(key) if defined.\n    o.__Set(field, value)    ... Set an attribute and validate\n\nFor internal use:\n\n    o.__abstract             ... The fields that define the assured \n                                 interface of the object (those \n                                 fields not inherited from prototypes)\n\nYou should not overwrite the values of these fields. As a rule, the \nnames of prototype-specific methods/attributes are prefixed with two \nunderscores. Any method/attribute that is prefixed with an underscore \nwon't inherited by child objects.\n\n\n-----------------------------------------------------------------------\n\nStatus:  Work in progress\nInstall: See http://github.com/tomtom/vimtlib/blob/master/INSTALL.TXT\nSee http://github.com/tomtom for related plugins.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomtom%2Fprototype_vim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomtom%2Fprototype_vim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomtom%2Fprototype_vim/lists"}