{"id":16368591,"url":"https://github.com/simoneb/vuex-function-actions","last_synced_at":"2026-04-19T02:02:09.247Z","repository":{"id":66303540,"uuid":"146208291","full_name":"simoneb/vuex-function-actions","owner":"simoneb","description":"Refactor-friendly Vuex actions and mutations, heavily inspired by redux-actions","archived":false,"fork":false,"pushed_at":"2018-09-01T10:42:02.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-05T04:39:50.453Z","etag":null,"topics":["actions","vue","vuex"],"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/simoneb.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":"2018-08-26T19:01:36.000Z","updated_at":"2018-09-01T10:43:59.000Z","dependencies_parsed_at":"2023-02-27T18:00:24.900Z","dependency_job_id":null,"html_url":"https://github.com/simoneb/vuex-function-actions","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"9ae45cc7923ca9c3fe6cc9ae2f9a28782e6a7052"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simoneb/vuex-function-actions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simoneb%2Fvuex-function-actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simoneb%2Fvuex-function-actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simoneb%2Fvuex-function-actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simoneb%2Fvuex-function-actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simoneb","download_url":"https://codeload.github.com/simoneb/vuex-function-actions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simoneb%2Fvuex-function-actions/sbom","scorecard":{"id":824701,"data":{"date":"2025-08-11","repo":{"name":"github.com/simoneb/vuex-function-actions","commit":"9ae45cc7923ca9c3fe6cc9ae2f9a28782e6a7052"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/8 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-23T16:24:33.585Z","repository_id":66303540,"created_at":"2025-08-23T16:24:33.585Z","updated_at":"2025-08-23T16:24:33.585Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020330,"owners_count":26086864,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["actions","vue","vuex"],"created_at":"2024-10-11T02:53:12.987Z","updated_at":"2025-10-14T18:14:14.185Z","avatar_url":"https://github.com/simoneb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vuex-function-actions\n\n[![Build Status](https://travis-ci.org/simoneb/vuex-function-actions.svg?branch=master)](https://travis-ci.org/simoneb/vuex-function-actions)\n[![codecov](https://codecov.io/gh/simoneb/vuex-function-actions/branch/master/graph/badge.svg)](https://codecov.io/gh/simoneb/vuex-function-actions)\n[![npm version](https://badge.fury.io/js/vuex-function-actions.svg)](https://badge.fury.io/js/vuex-function-actions)\n\n| Refactor-friendly [Vuex](https://github.com/vuejs/vuex) actions and mutations, heavily inspired by [redux-actions](https://github.com/redux-utilities/redux-actions)\n\n### Installation\n\n```bash\n$ npm install --save vuex-function-actions\n```\n\nThe [npm](https://www.npmjs.com/package/vuex-function-actions) package provides a [CommonJS](http://webpack.github.io/docs/commonjs.html) build for use in Node.js, and with bundlers like [Webpack](http://webpack.github.io/) and [Browserify](http://browserify.org/). It also includes an [ES modules](http://jsmodules.io/) build that works well with [Rollup](http://rollupjs.org/) and [Webpack2](https://webpack.js.org)'s tree-shaking.\n\nThe [UMD](https://unpkg.com/vuex-function-actions@0.0.1/dist/vuex-function-actions.js) build (or the [minified](https://unpkg.com/vuex-function-actions@0.0.1/dist/vuex-function-actions.min.js) flavor) exports a global called `window.VuexFunctionActions` if you add it to your page via a `\u003cscript\u003e` tag. We _don’t_ recommend UMD builds for any serious application, as most of the libraries complementary to Vuex are only available on [npm](https://www.npmjs.com/search?q=vuex). Note that this package has a peer dependency on Vuex, therefore if you use the UMD build, Vuex has to be included before.\n\n### Motivation\n\nIn plain Vuex, actions and mutations have string keys, which is not very refactoring friendly. The aim of this library is to allow using functions rather than strings to:\n\n- configure actions and mutations in the Vuex store\n- import actions in components\n- commit mutations in actions\n\n### Usage\n\n1. Define mutations\n\n```js\n/// mutations.js\nimport { createMutation } from 'vuex-function-actions'\n\nexport const storeIncrement = createMutation('STORE_INCREMENT', (state, { amount }) =\u003e {\n  state.count += amount\n})\n\n```\n\n2. Define actions\n\n```js\n/// actions.js\nimport { createAction } from 'vuex-function-actions'\nimport { storeIncrement } from './mutations'\n\nexport const incrementBy = createAction('INCREMENT_BY', ({ commit }, amount) =\u003e \n  // commit function mutations instead of strings\n  commit(storeIncrement({ amount }))\n)\n\n```\n\n1. Configure actions and mutations in the Vuex store\n\n```js\nimport Vuex from 'vuex'\nimport { mapMutations } from 'vuex-function-actions'\nimport { storeIncrement } from './mutations'\nimport { incrementBy } from './actions'\n\nnew Vuex.Store({\n  state: {\n    count: 1\n  },\n  // use the `mapMutations` helper to inject mutations\n  // accepts either an array or a variable number of arguments\n  mutations: mapMutations(storeIncrement),\n  actions: {\n    incrementBy\n  }\n})\n```\n\n4. Inject and dispatch actions in Vue components\n\n```html js\n\u003c!-- Component.vue --\u003e\n\u003ctemplate\u003e\n  \u003cbutton @click=\"onClick\"\u003eClick me!\u003c/button\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nimport { mapActions } from 'vuex-function-actions'\nimport { incrementBy } from './actions'\n\nexport default {\n  /* ... */\n  methods: {\n    // use the `mapActions` helper to inject function actions\n    // accepts either an array or a variable number of arguments\n    ...mapActions(incrementBy),\n    onClick() {\n      // dispatch the injected actions in the usual way\n      this.incrementBy(1)\n    }\n  }\n}\n\u003c/script\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimoneb%2Fvuex-function-actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimoneb%2Fvuex-function-actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimoneb%2Fvuex-function-actions/lists"}