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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kocdigital/p360-user-vue-plugin

v0.0.4

Published

Koç Digital Platform360 User Vue Plugin

Readme

Platform360 User Vue Plugin

Overview

This Vue plugin facilitates streamlined access to user data via $jwtUser and $user global variables, fetches user data once and clears the user cache upon logout.

Installation

npm install @kocdigital/p360-user-vue-plugin
yarn add @kocdigital/p360-user-vue-plugin

or

yarn add git+https://github.com/kocdigital/p360-user-vue-plugin.git
npm install git+https://github.com/kocdigital/p360-user-vue-plugin.git

Usage

After installation, you can import the plugin in your Vue application as follows:

import Vue from 'vue';
import user from '@kocdigital/p360-user-vue-plugin';

Vue.use(user);

Access user models to customize user or jwt user data:

import Vue from 'vue';
import user from '@kocdigital/p360-user-vue-plugin';
import {User as DefaultUser} from '@kocdigital/p360-user-vue-plugin/models';

export class MyCustomUser extends DefaultUser {
  // Your customizations here
}

Vue.use(user, {
  CustomUser: MyCustomUser
});
import Vue from 'vue';
import user from '@kocdigital/p360-user-vue-plugin';
import {JwtUser as DefaultJwtUser} from '@kocdigital/p360-user-vue-plugin/models';

export class MyCustomJwtUser extends DefaultJwtUser {
  // Your customizations here
}

Vue.use(user, {
  CustomJwtUser: MyCustomJwtUser
});

Customize the user fetching logic by providing your own fetchUserById function:

import Vue from 'vue';
import user from '@kocdigital/p360-user-vue-plugin';

import type {IUser} from '@kocdigital/p360-user-vue-plugin/models';

Vue.use(user, {
  fetchUserById: async (userId): Promise<IUser> => {
    // Your custom fetch logic here
    const response = await fetch(`/api/users/${userId}`);
    const data: IUser = await response.json();

    return data; // Must return `IUser`, otherwise throw type error
  }
});

Customize user cache target by providing storage options:

   import Vue from 'vue';
   import user from '@kocdigital/p360-user-vue-plugin';
 
   Vue.use(user, {
     storage: sessionStorage, // default is `localStorage`
     storageKey: 'my-custom-user-cache' // default is "x-user"
   });

Contributing

If you would like to contribute to this project, please fork the repository and submit a pull request with your changes.

Prerequisites

Setup

  1. Clone the repository:

    git clone https://github.com/kocdigital/p360-user-vue-plugin.git
    cd p360-user-vue-plugin
  2. Install the dependencies:

    npm install

Building the Plugin

To build the plugin, you can use the following commands:

  • One-time build:

    npm run build
  • Continuous build:

    npm run dev

The npm run build command will create a production-ready build of the plugin, while npm run dev will run the build in watch mode, rebuilding automatically on changes.

Linking with npm

To link this vue plugin with your main application using npm, follow these steps:

  1. In the root directory of the plugin, run:

    npm link
  2. Navigate to your main application directory:

    cd path/to/your/main/application
  3. Link the plugin to your main application:

    npm link "@kocdigital/p360-user-vue-plugin"
  4. Now you can develop features or fix bugs in the plugin and see the changes reflected in your main application without needing to publish the plugin to npm.