Socket
Socket
Sign inDemoInstall

gitlab-repo-db

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitlab-repo-db - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

12

package.json
{
"name": "gitlab-repo-db",
"version": "0.1.0",
"version": "0.1.1",
"description": "A database based on gitlab files",
"main": "./lib/index.js",
"license": "MIT",
"author": {
"name": "cyyjs",
"email": "cyy0418@qq.com"
},
"scripts": {

@@ -12,3 +16,7 @@ "build": "yarn lint && rollup -c",

},
"homepage": "",
"homepage": "https://github.com/cyyjs/gitlab-repo-db",
"repository": {
"type": "git",
"url": "git@github.com:cyyjs/gitlab-repo-db.git"
},
"types": "./lib/index.d.ts",

@@ -15,0 +23,0 @@ "files": [

@@ -1,2 +0,2 @@

## gitlab-db
## gitlab-repo-db

@@ -6,1 +6,55 @@ 基于Gitlab 仓库文件存储的数据库

### 安装
```bash
yarn add gitlab-repo-db
```
### 使用
```js
const DB = new GitlabDB({
url: 'your gitlab api url',
projectID: 'repo project id',
token: 'your gitlab token'
})
const collection = DB.collection('test')
const query = {
a: 1
}
// find all
collection.find(query)
// find one
collection.findOne(query)
// insert one
collection.insert({
b: 1
})
// insert multiple
collection.insert([{
b: 1
}, {
c: 1
}])
// update
const updateData = {
c: 1
}
const updateOption = {
multi: true, // default: false
upsert: true // default: false
}
collection.update(query, updateData, option)
// remove all
collection.remove(query)
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc