New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

ctils

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ctils

A collection of utility functions for various tasks. Licensed under MIT/Apache-2.0. Includes TypeScript support and compatible with both ESM and CJS import styles.

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

ctils

ctils is a simple key-value store written in Rust ctils.

Built with 🦀🕸 by The Rust and WebAssembly Working Group

About

📚 Read this template tutorial! 📚

This template is designed for compiling Rust libraries into WebAssembly and publishing the resulting package to NPM.

Be sure to check out other wasm-pack tutorials online for other templates and usages of wasm-pack.

🚴 Usage

🐑 Use npm install ctils to use this package

npm install ctils

🛠️ Use In Your Pages

import * as rsStore from 'ctils';
const store = new rsStore.RsStore();

or

import { RsStore } from 'ctils';
const store = new RsStore();

🚴‍ Apis

store.set('key', 'value'); // ()=> viod

store.get('key'); // ()=> value | undefined

store.remove('key'); // ()=> value | undefined

store.clear(); // ()=> void

store.keys(); // ()=> Array<string>

store.values(); // ()=> Array<any>

store.size(); // ()=> number

store.has('key'); // ()=> boolean

store.get_all(); // ()=> JSON

FAQs

Package last updated on 06 Jun 2024

Related posts