{"id":15882240,"url":"https://github.com/ph1p/vue-nsmixin","last_synced_at":"2025-04-02T05:43:35.682Z","repository":{"id":90567666,"uuid":"179677933","full_name":"ph1p/vue-nsmixin","owner":"ph1p","description":"Vue namespaced mixins","archived":false,"fork":false,"pushed_at":"2019-04-06T10:52:41.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T06:34:27.466Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ph1p.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-05T12:32:53.000Z","updated_at":"2019-12-24T02:10:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"1009712e-a37c-4a82-bf4e-a4d6e0f1460b","html_url":"https://github.com/ph1p/vue-nsmixin","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"e0a678e5d205e5a04db7aa20334bfdb9b26b2a74"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ph1p%2Fvue-nsmixin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ph1p%2Fvue-nsmixin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ph1p%2Fvue-nsmixin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ph1p%2Fvue-nsmixin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ph1p","download_url":"https://codeload.github.com/ph1p/vue-nsmixin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246763860,"owners_count":20829798,"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-10-06T04:02:12.101Z","updated_at":"2025-04-02T05:43:35.653Z","avatar_url":"https://github.com/ph1p.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## vue-nsmixin\n\nThis small script (**n**ame**s**pacemixin) provides a solution to use \"namespaced\" methods, computed and data values.\n\n## How to use?\n\n```bash\nnpm i vue-nsmixin\n# or\nyarn add vue-nsmixin\n```\n\n```javascript\nconst NsMixin = require('vue-nsmixin');\n// or\nimport NsMixin from 'vue-nsmixin';\n\nVue.use(NsMixin, {\n  useFn: true // use namespace function for methods\n  seperator: '', // default \"__\"\n  firstLetterUpperCase: false // set first letter of method, data or computed to uppercase\n});\n```\n\nNow you can do this:\n\n```javascript\nVue.nsMixin('namespace', {\n  // ...options\n  data() {\n    return {\n      value: ''\n    }\n  },\n  computed: {\n    cpValue() {\n      // ...\n    }\n  }\n  methods: {\n    func() {\n      // ...\n    }\n  }\n});\n```\n\nIn your component:\n\n```javascript\nthis.namespace().func(); // to use this set useFn: true in options\n\n// or\n\nthis.namespace__func(); // method\n\nthis.namespace__value; // data\nthis.namespace__cpValue; // computed\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fph1p%2Fvue-nsmixin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fph1p%2Fvue-nsmixin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fph1p%2Fvue-nsmixin/lists"}