{"id":18524797,"url":"https://github.com/iminside/js.private","last_synced_at":"2025-10-31T23:30:26.792Z","repository":{"id":85562819,"uuid":"42499455","full_name":"iminside/js.private","owner":"iminside","description":"Private properties for objects","archived":false,"fork":false,"pushed_at":"2015-09-22T08:28:25.000Z","size":164,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-16T08:16:35.359Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iminside.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}},"created_at":"2015-09-15T06:23:36.000Z","updated_at":"2025-01-13T21:13:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"9f443e52-dbd4-43b5-9339-7297c982dd10","html_url":"https://github.com/iminside/js.private","commit_stats":null,"previous_names":["4urbanoff/js.private"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iminside%2Fjs.private","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iminside%2Fjs.private/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iminside%2Fjs.private/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iminside%2Fjs.private/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iminside","download_url":"https://codeload.github.com/iminside/js.private/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239103008,"owners_count":19582070,"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":"2024-11-06T17:43:22.051Z","updated_at":"2025-10-31T23:30:26.747Z","avatar_url":"https://github.com/iminside.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Install\n\n```\nnpm install js.private --save\n```\n\n### Usage\n\n```javascript\n  \nimport Private from \"js.private\";\n\nclass People {\n\n  constructor( firstname, lastname, gender, city, street ){\n    $( this ).firstname       = firstname;  // private property\n    $( this ).lastname        = lastname;   // private property\n    $( this ).address.country = country;    // private property\n    $( this ).address.city    = city;       // private property\n    this.gender               = gender;     // public  property\n  }\n\n  get name(){\n    return $( this ).generateName();        // call private method\n  }\n\n  get info(){\n    return this.gender + \", \" + $( this ).age;\n  }\n  \n  get address(){\n    return $( this ).address.city + \", \" + $( this ).address.street;\n  }\n\n}\n\nconst $ = Private({\n  firstname: \"\", // Default values\n  lastname:  \"\", \n  age:       28, \n  address: {\n    country: \"\",\n    city:    \"\"\n  },\n  generateName: function(){\n    return $( this ).firstname + \" \" + $( this ).lastname;\n  }\n});\n\n\nlet ivan = new People( \"Ivan\", \"Ivanow\", \"man\", \"Russia\", \"Moscow\" );\n\nivan.name          // \u003e \"Ivan Ivanov\"\nivan.info          // \u003e \"man, 28\"\nivan.address       // \u003e \"Russia, Moscow\"\n\nlet anna = new People( \"Anna\", \"Ananina\", \"woman\", \"Germany\", \"Berlin\" );\n\nivan.name          // \u003e \"Anna Ananina\"\nivan.info          // \u003e \"woman, 28\"\nivan.address       // \u003e \"Germany Berlin\"\n\nivan.lastName      // \u003e undefined\nanna.gender        // \u003e \"woman\"\nivan.generateName  // \u003e undefined\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiminside%2Fjs.private","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiminside%2Fjs.private","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiminside%2Fjs.private/lists"}