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

@three0dev/js-sdk

v0.2.0-alpha

Published

JS-SDK for Three0 platform

Downloads

2

Readme

Three0 JS SDK

This is a JS SDK is intended for browser based applications that need to interact with the Three0 Service Suite. It is not intended yet for Node.js applications. The SDK is currently in alpha stage development and is not yet ready for production use.

Initialization

npm i --save @three0dev/js-sdk

Usage

  1. Import Three0 and prepare configuration
import { init } from '@three0dev/js-sdk'

const config = {
  "contractName": "myTestContract",
  "projectId": "myTestProject",
  "chainType": "NEAR_TESTNET"
}
  1. Initialize SDK

React

React >=18

import React from 'react'
import { createRoot } from 'react-dom/client'
import App from './App'

init(config).then(() => {
  const container = document.querySelector('#root')
  const root = createRoot(container)
  root.render(<App />)
}).catch(console.error)

React <18

import React from 'react'
import { render } from 'react-dom'
import App from './App'

init(env.config)
  .then(() => {
    render(
      <App />,
      document.getElementById("root")
    );
}).catch(console.error)

Vue

import { createApp } from 'vue';
import App from './App.vue';

init(config)
  .then(() => {
    const app = createApp(App);
    app.use(store);
    app.use(router);
    app.mount('#app');
}).catch(console.error)

Angular

WIP

Vanilla

WIP: Pending Bug Fixes and CDN Compatibility

Services

Auth

import { Auth } from '@three0dev/js-sdk'
  • Auth.login():Promise<void>
    • Logs into dApp using NEAR Wallet
    • Creates new user on NEAR blockchain if user doesn't exist
  • Auth.logout():Promise<void>
    • Logs out of dApp
  • Auth.isLoggedIn():boolean
    • Returns true if user is logged in
  • Auth.getAccountId():string
    • Returns user account ID

Database

import { Database } from 'three0-js-sdk'

DocStore:

const docstore = await Database.DocStore([address])
  • docstore.get(key:string):any
    • Gets value from docstore
    • Returns null if key doesn't exist
  • docstore.where(callback: Function):any[]
    • Returns array of values that match callback function
    • Ex: docstore.where(doc => doc.key === 'value')
  • docstore.set(key:string, value:Object):Promise<void>
    • Sets value in docstore
  • docstore.add(value:Object):Promise<string>
    • Adds value to docstore
    • Returns key of added value
  • docstore.update(key:string, value:Object):Promise<void>
    • Updates value in docstore
  • docstore.delete(key:string):Promise<void>
    • Deletes value from docstore

KeyValue:

const keyvalue = await Database.KeyValue([address])
  • keyvalue.get(key:string):any
    • Gets value from database
    • Returns null if key doesn't exist
  • keyvalue.getAll():any[]
    • Gets all values from database
  • keyvalue.set(key:string, value:any):Promise<void>
    • Sets value in database
  • keyvalue.delete(key:string):Promise<void>
    • Deletes value from database

Counter:

const counter = await Database.Counter([address])
  • counter.get():number
    • Gets current value of counter
  • counter.increment(value:int):Promise<void>
    • Increments counter by value
    • Value must be >= 1

Eventlog

WIP - Will be released during beta version

Feed

WIP - Will be released during beta version

All Databases

  • db.onChange(callback: Function)
    • Listens to any changes in database and calls callback when changes are made

License and Code of Conduct

This repository is distributed under the terms of both the the GPL License (Version 3.0). See LICENSE.

See Code of Conduct for more information on contribution and ethical standards.

Open Source References