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

yuumi-storage

v0.2.7

Published

web storage

Downloads

13

Readme

安装

npm install yuumi-storage

使用

web

/**
 * option.prefix 要存储的数据的名称的前缀
 * option.hyphen 要存储的数据的名称的前缀和名称之间的连字符,默认未"_"
 * option.expireTime 过期时间:[天,时,分,秒]
 * option.expiredAutoDelete 访问过期值自动删除
 * option.domain
 * option.path
 */

import { YuumiCookieStorage } from "yuumi-storage"
const instace = new YuumiCookieStorage{option}

/**
 * option.prefix 要存储的数据的名称的前缀
 * option.hyphen 要存储的数据的名称的前缀和名称之间的连字符,默认未"_"
 * option.expireTime 过期时间:[天,时,分,秒]
 * option.expiredAutoDelete 访问过期值自动删除
 */
import { YuumiLocalStorage } from "yuumi-storage"
const instace = new YuumiLocalStorage{option}

import { YuumiSessionStorage } from "yuumi-storage"
const instace = new YuumiSessionStorage{option}

小程序

import { YuumiMiniProgramStorage } from "yuumi-storage"
const instace = new YuumiMiniProgramStorage{option}
/**
 * 通过键值对存储
 * @param {string} key - 要存储的数据的名称(键)
 * @param {string} value - 要存储的数据的值(值)
 */
instance.setItemSync(key: string, value: string): void;
/**
 * 通过键值对存储
 * @param {string} key - 要存储的数据的名称(键)
 * @param {string} value - 要存储的数据的值(值)
 * @return {Promise<void>}
 */
instance.setItem(key: string, value: string): Promise<void>;
/**
 * 检索指定的键所对应的值
 * @param {string} key - 要检索的数据的名称(键)
 * @return {string|undefined}
 */
instance.getItemSync(key: string): string | undefined;
/**
 * 检索指定的键所对应的值
 * @param {string} key - 要检索的数据的名称(键)
 * @return {Promise<string|undefined>}
 */
instance.getItem(key: string): Promise<string | undefined>;
/**
 * 删除指定的键所对应的值
 * @param {string} key - 要删除的数据的名称(键)
 */
instance.removeItemSync(key: string): void;
/**
 * 删除指定的键所对应的值
 * @param {string} key - 要删除的数据的名称(键)
 * @return {Promise<void>}
 */
instance.removeItem(key: string): Promise<void>;
/**
 * 清空所有键值对
 * @param {clearFilter} filter - 过滤函数,如何返回false则会跳过不清理
 */
instance.clear(filter?: (key: string) => boolean): void;