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

popo-storage

v1.0.5

Published

客户端存储缓存插件

Readme

使用教程

该插件此版本仅用于存储本地 local 或者 session 数据,包括存储 function undefine 数据类型

setStorageName

setStorageName 设置需要存储的整个数据的 name 如果是 class 模式使用就实例化前即可,否则就需要调用 setStorageName 方法进行重新定义,默认值为'storage'

import { Storage } from 'popo-storage';
// 该构造函数传入两个参数
// 参数1:存储名字
// 参数2:存储类型,默认为 localStorage
//       可选值为: 'local'   'session'
const storage = new Storage('name', 'local');
storage.set();

// ----------------------------------------
import { setStorageName, set } from 'popo-storage';
setStorageName('name');
set();

| 参数 | 描述 | | ---- | ---------- | | name | 数据的名字 |

get

get 方法用于获取数据里的单个数据

| 参数 | 描述 | | ---- | ------------ | | key | 需要获取的键 |

set

set 方法用于对数据里写入的单个数据

| 参数 | 描述 | | ----- | ------------ | | key | 需要存储的键 | | value | 需要存储的值 |

clearItem

clearItem 方法用于清除某条数据

| 参数 | 描述 | | ---- | ------------ | | key | 需要清除的键 |

clear

clear 方法用于清除所有数据

| 参数 | 描述 | | ---- | ---- | | 无 | 无 |