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 🙏

© 2024 – Pkg Stats / Ryan Hefner

secured-web-storage

v0.3.1

Published

Secure storage for web applications

Downloads

29

Readme

secured-web-storage

The data will be stored using CryptoJS AES (Advanced Encryption Standard)

A secure storage for web application

npm MIT

Demo

You can see the demo here

Installation

npm install secured-web-storage --save

or

yarn add secured-web-storage --save

Usage

In Web application

In side index.html

<script src="node_modules/secured-web-storage/dist/index.min.js"></script>

In js file where you want to use this package

var config = { name: 'test', type: 'localStorage', secretKey: 'test' };
var store = new SecuredWebStorage(config);

store.setItem('key1', { a: 12345 });

store.getItem('key1');

In Vue application

In your main.js file

import SecuredWebStorage from 'secured-web-storage';

var config = { name: 'test', type: 'localStorage', secretKey: 'test', secure: true };
var store = new SecuredWebStorage(config);

Vue.prototype.store = store;

In vue.js components where you want to use this package

this.store.setItem('key1', { a: 12345 });

this.store.get('key1');

Configuration Options

Option | Type | Default Value | Description ------ | ---- | ------------- | ----------- name | String | app | You can give your application name so that all your keys in browser storage will be prepended with your name of the application type | Storage | localStorage | You can use either localStorage or sessionStorage secretKey | String | SECRET_KEY | You can use any secret key secure | Boolean | true | You can enable or disable encryption / decryption with this value

Usage of configuration options

var config = { name: 'test', type: 'localStorage', secretKey: 'test', secure: true };
var store = new SecuredWebStorage(config);

Methods

Method | Syntax | Description ------ | ------ | ----------- setItem | setItem('key', value) | Set the item in to browser storage. getItem | getItem('key') | Get the item from browser storage. deleteItem | deleteItem('key') | Delete the item from storage. getAllItems | getAllItems() | Get all the items from storage. deleteAllItems | deleteAllItems() | Delete all the items from storage. getAllKeys | getAllKeys() | Get all the keys stored. getLength | getLength() | Get the length of items stored.

npm package

You can find npm registry link here

License

MIT

Release Notes

v0.0.1

  • Initial version with basic storage with encryption and decryption

v0.0.2

  • Initial version with basic storage with encryption and decryption
  • Added demo for web application

v0.0.3

  • Added optional feature to enable or disabled encryption and decryption
  • Added vue.js app demo

v0.1.0

  • Stable version release

v0.2.0

  • Keys will be fetched based on the configuration
  • Updated Readme with configuration options and methods

v0.3.0

  • Pacakge name modified to secured-web-storage

v0.3.1

  • Demos updated to work with latest version of secured-web-storage
  • Script file path modified in readme.md file

Contact

  • Gmail : [email protected]
  • Github : https://github.com/rajeshwarpatlolla
  • Twitter : https://twitter.com/rajeshwar_9032
  • Facebook : https://www.facebook.com/rajeshwarpatlolla