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

@stringon/tsubasa

v0.4.1

Published

tsubasa module for stringon

Downloads

45

Readme

tsubasa

“翼(つばさ)”是wing用于在云端存储和同步用户敏感数据的模块,采用客户端加密实现, 所有数据内容对服务端完全透明,调用者指定用户数据结构及其初始状态作为全局状态树,并 指定云端的同步API以便从云端同步当前状态。

Build and Demo

Tsubasa is module installed by npm i @stringon/tsubasa

For development, just run npm run build to packing the lib and demo (you need a debugToken.json file in the root directory for the demo)

  • Notice we have skip 'crypto' library in nodeJs for it enlarge the package greatly (from ~150KB current to > 590KB)

Usage

Create a tsubasa instance with a chaining style:


const my_tsubasa_instance = require('@stringon/tsubasa')
    .topic(...)*[ .prune() | .magicheader(...)]
    .http(...)*[.option(...)]
    .key(...)[.schema(...)]
    1#[.instance | duplicate()]
  • topic: select a data topic, tsubasa object corresponding different topic will be isolated.

    • You can adopt the result with prune(), which will clean any history you have make, CAUTION WITH THIS DANGEROUS FLAG

    • You can specify a series of "magicheader" handler function, which has a getter/ verfier form, i.e:

    magicheader := (h:{string | undefined}) => {boolean | string}

    if h is string check if it is expected
    else return the expected string

A URL-safe string as magic code header is prefixed to the root key. On init, current magic code will be passed to all functions specified in magicheader to check if it match to one of them. And the returned string from first function (called without an argument) will be the magic code in the next commit. Pass string 'default' instead of a function will indicate using the default one. i.e. check and return the magic code 'SH'

  • http: provide a axios like httplib for communication with cloud storage, tsubasa itself never purpose it

    • You can adopt the result with one or more option(...), passing option objects for the api vendor and more axio configs, mutiple option will be merged and for duplicated filed which occur in the last option call will be respected
  • key: provide the main encrypt/decrypt key

    • You can adopt the result with one or more schema(...), passing schema settings and mutiple schema will be merged

Finally you obtain the Promise object of tsubasa from the instance field, or you can create another duplicated object by calling duplicate() method