npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

vuexi

v1.2.5

Published

Vuex and Vue Router helper functions

Readme

Vuexi

Maintainability

Work in progress, so breaking changes in API are possible. Please consider locking dependency if this library fit your needs!

Vuexi is a toolset of small but very useful functions to reduce vuex code base for async flows and adds optional caching, etc. To check entire functionality consider to look into index.js file. Also you can check presentation of this library in https://odessafrontend.com/15/ video Vuexi Presentation or go to NPMjs https://www.npmjs.com/package/vuexi.

npm install vuexi

yarn add vuexi

Example For Vuex actions and mutations

// some random vuex module for view with instances
import * as InstancesClient from '@/resources/instances'
/*
export function getInstances({ projectId }) {
  return HTTP.get(`/projects/${projectId}/instances`)
}
export function createInstance({ projectId, ...options }) {
  return HTTP.post(`/projects/${projectId}/instances`, options)
}
*/
import { begin, success, error, query, poll, M, action } from 'vuexi'

const QUERY_INSTANCES = M.of('QUERY_INSTANCES')

export default {
  namespaced: true,
  state: {
    instances: [],
    isQueryInstancesLoading: false,
    queryInstancesError: null
  },
  actions: {
    // InstancesClient.getInstances is a axios async call
    queryInstances: query(QUERY_INSTANCES, InstancesClient.getInstances), // used for initial load of state
    pollInstances: poll(QUERY_INSTANCES, InstancesClient.getInstances), // used for polling purposes with setInterval
  },
  mutations: {
     // like this 
     ...action(QUERY_INSTANCES, 'isQueryInstancesLoading', 'instances', 'queryInstancesError', success),
     // is the same as like this
    [QUERY_INSTANCES]: begin('isQueryInstancesLoading', 'queryInstancesError'), // essentialy is a macros to set isQueryInstancesLoading to true and queryInstancesError to null
    [QUERY_INSTANCES.SUCCESS]: success('isQueryInstancesLoading', 'instances'), // sets isQueryInstancesLoading to false and instances from axios data object provided to this mutation from "query" or "poll" helper
    // success call can be replaces with any other to modify state on your purpose (removeById, push, silence, etc)
    [QUERY_INSTANCES.FAILURE]: error('isQueryInstancesLoading', 'queryInstancesError') // sets isQueryInstancesLoading to false and queryInstancesError to error from axious call provided to this mutation
  }
}

Example for router

import { route } from 'vuexi'

export default [
  route('/', Dashboard, {
    beforeEnter: onUnauthorizedRedirectToLogin,
    children: [
      route('', Default, { name: 'default' }),
      route('user/', UserDashboard, {
        children: [
          route('profile', UserProfile, { name: 'user-profile' }),
          route('', undefined, { name: 'default-user-profile', redirect: { name: 'user-profile' } })
        ]
      }),
      route('project/:projectId', TeamDashboard, {
        children: [
          route('', undefined, { name: 'resources', redirect: to => `/project/${to.params.projectId}/users` }),
          route('users', Users, { name: 'users' }),
          route('users/new', NewUser, { name: 'new-user' }),
          route('users/:id/edit', EditUser, { name: 'edit-user' }),

Sponsors

Vuexi used by ScalableSpace and by ScaleChamp