# content-block

> ORM for decentralized storage

Latest version **1.0.0** (published 2018-03-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install content-block
pnpm add content-block
yarn add content-block
bun add content-block
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-03-04 |
| First published | 2018-03-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | darkua |

## Links

- npm: https://www.npmjs.com/package/content-block
- npm.io page: https://npm.io/package/content-block

## Dependencies (3)

- [moment](https://npm.io/package/moment.md) ^2.21.0
- [shortid](https://npm.io/package/shortid.md) ^2.2.8
- [blockstack](https://npm.io/package/blockstack.md) ^0.15.1

## Recent versions

- 1.0.0 (latest) — 2018-03-04
- 0.0.7 — 2018-03-04
- 0.0.5 — 2018-03-04
- 0.0.4 — 2018-03-04
- 0.0.3 — 2018-03-04
- 0.0.2 — 2018-03-03
- 0.0.1 — 2018-03-03

## README

content-block, a blockstack library for app data sharing
===========================

## Install

    npm install content-block

## Description

Content storage is underlying driver to definise a phisical layer of storage

Content Collection creates the abstraction layer, to define an type base data schema
to simplify user sharing data cross apps.


## Usage Example


```js
const content = require("block-content")

const blockStack = content.storage();
const notes = new content.collection({
    type: "note",
    storage: blockStack,
    userID:"ryan.id"
});

// Save Content
notes.createItem({ "txt": "blockstack, decentralize this note!"}).then((res)=>{
    console.log("this is a awsome note",res.id)
}).catch((err)=>{
    console.error(err)
})

//Get App Content by Identifier
notes.getItem("note.id").then((res)=>{
    console.log("this is a awsome note",res)
}).catch((err)=>{
    console.error(err)
})


//Get ALL USER DATA type, shared across blockstack Multi Player Application

lookupProfile("ryan.id").then(async (u)=>{
    let items = await notes.getUserData(Object.values(u.apps),"note");
    console.log("items",items)
})
```

---
_Source: https://npm.io/package/content-block · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
