Pcloud utils usage
Use when developer needs to install or use @pointcloud/pcloud-utils browser utility library with cache, IndexedDB, WebSocket, form validation, tree operations, or coordinate transforms.From its SKILL.md
npx -y skills add Frank17008/skills --skill pcloud-utils-usageAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.8 KB, 453 tokens by cl100k_base, as published. Nobody here has run it
pcloud-utils Usage Guide
Overview
TypeScript browser utility library. 13 modules: cache, indexDB, socketEmitter, file, formTest, coordTransform, treeHelper, numHelper, strHelper, fscHelper, http, eventBus, uuid, groupByField.
Install
npm install @pointcloud/pcloud-utils
import { cache, uuid, formTest, IndexDB } from "@pointcloud/pcloud-utils";
Core Modules
| Module | Key Functions |
|---|---|
| cache | setCache(key, value, type?), getCache(key, type?), clearCache(key), clearAll(type, keys?) |
| indexDB | openDB(name, version, store), put/get/update/remove(store, data), closeDB() |
| socketEmitter | initWS(url), subscribe(event, fn), execAction(action, data) |
| formTest | ValidatorEmail, ValidatorTel, ValidatorIdCard, ValidatorBankCard |
| treeHelper | flatToTree(list, id, parentId), flatToList(tree), deepFind, wideTraversal |
| coordTransform | bd09togcj02, gcj02tobd09, wgs84togcj02 |
Quick Examples
Cache (local/session/cookie)
cache.setCache("user", { name: "Tom" }, "session");
const user = cache.getCache("user", "session");
cache.clearCache("user");
Form Validation
formTest.ValidatorEmail("[email protected]"); // true
formTest.ValidatorTel("13800138000"); // true
IndexDB
const db = await IndexDB.openDB("myDB", 1, "store");
await db.put("store", { key: "id", value: data });
const result = await db.get("store", "id");
Build
npm run build # ESM + UMD
npm run doc # TypeDoc
npm run release # publish (main branch)
Docs
docs/index.html - run npm run doc to regenerate
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.