Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
add git page
Browse files Browse the repository at this point in the history
  • Loading branch information
Terracrow committed Sep 13, 2024
1 parent 4ce0026 commit a07daa9
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 0 deletions.
12 changes: 12 additions & 0 deletions page/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>TML</title>
<script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@2/webcomponents-loader.min.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/gh/zerodevx/zero-md@1/src/zero-md.min.js"></script>
</head>
<body>
<zero-md src="index.md"></zero-md>
</body>
</html>
77 changes: 77 additions & 0 deletions page/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
## TML: Simple-use YAML data storage

> TML is a easy to use package for data manipulation
- **Docs** [docs](https://terracrow.github.io/tml)
- **NPM** [npm](https://npmjs.com/tml-db)

### Installation
```sh
# npm
npm install --save tml-db

# yarn
yarn add tml-db

# clone source code
git clone https://github.com/Terracrow/tml.git
```

### Examples
> Initialize and set a value in a key
```typescript
// #test.js

// import TMLDriver
import { TMLDriver } from 'tml';

// data to be stored
const data = [
{
id: 1234,
allowed: true
},
{
id: 2341,
allowed: false
}
];

// create a database connection
const tml = new TMLDriver({
limit: 100 // number of files allowed
customDir: 'tml' // set custom output path or put 'tml'
});

// set 'data[]' in 'access_perms.yml'
tml.set({
key: 'access_perms',
value: data
});


/** Output (access_perms.yml)
* ---
- id: 1234
allowed: true
- id: 2341
allowed: false
*/
```

> Get or delete data
```typescript
// #test.js

// get the value of a key
const usersPerms = db.get('access_perms');

// delete data
db.delete('access_perms');
```

---
***This project is not finished and can present some bugs.***

>Made by Terracrow | 1.0.0
Empty file added page/style.css
Empty file.

0 comments on commit a07daa9

Please # to comment.