Comparing version 2.2.1 to 3.0.0
{ | ||
"name": "shelf", | ||
"version": "2.2.1", | ||
"description": "Redis Object Document Mapper (ODM)", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "./node_modules/lab/bin/lab --verbose", | ||
"test-cov": "./node_modules/lab/bin/lab --verbose -c", | ||
"lint": "standard --verbose | snazzy" | ||
}, | ||
"repository": "https://github.com/shelf-js/shelf", | ||
"pre-commit": [ | ||
"lint", | ||
"test" | ||
], | ||
"keywords": [ | ||
"redis", | ||
"odm", | ||
"object", | ||
"document", | ||
"mapper", | ||
"storage", | ||
"fast" | ||
], | ||
"author": [ | ||
{ | ||
"name": "Ricardo Barros", | ||
"email": "ricardofbarros@hotmail.com" | ||
}, | ||
{ | ||
"name": "João Antunes", | ||
"email": "j.goncalo.antunes@gmail.com" | ||
}, | ||
{ | ||
"name": "Pedro Carvalho", | ||
"email": "pedromatosdecarvalho@gmail.com" | ||
} | ||
], | ||
"license": "MIT", | ||
"devDependencies": { | ||
"code": "^2.1.0", | ||
"lab": "^8.2.0", | ||
"pre-commit": "^1.1.2", | ||
"proxyquire": "^1.7.4", | ||
"snazzy": "^2.0.1", | ||
"standard": "^6.0.4" | ||
}, | ||
"dependencies": { | ||
"async": "^2.0.0-rc.5", | ||
"hiredis": "^0.4.1", | ||
"joi": "^7.2.3", | ||
"lodash": "^4.12.0", | ||
"redis": "^2.4.2" | ||
} | ||
"version": "3.0.0", | ||
"description": "Database for Frontend Developers", | ||
"author": "siddharthkp", | ||
"license": "MIT" | ||
} |
@@ -1,50 +0,6 @@ | ||
![shelf Logo](https://avatars1.githubusercontent.com/u/14891842?v=3&s=200) | ||
Object Document Mapper (ODM) for Node.js who uses Redis as its store. | ||
[![Build Status](https://travis-ci.org/shelf-js/shelf.svg?branch=master)](https://travis-ci.org/shelf-js/shelf) | ||
[![npm version](https://img.shields.io/npm/v/shelf.svg)](https://www.npmjs.com/package/shelf) | ||
# Introduction | ||
If you need to store complex objects do Redis, but don't want to go through the trouble of translating your objects to a key, value store, then Shelf is for you. | ||
Shelf gives you CRUD operation on your objects over Redis, so you can create complex schemas and validate models. | ||
Shelf uses [joi](https://github.com/hapijs/joi) for schema validation. | ||
> If you're using 0.10 or 0.12 node version, please use `shelf@1`. You can also look at the code at the `1.x.x` branch. | ||
# Example | ||
```javascript | ||
const Shelf = require('shelf') | ||
const Joi = require('joi') | ||
const Storage = Shelf('MyApp', { | ||
port: 6379, | ||
host: '127.0.0.1' | ||
}) | ||
const MyModel = Storage.extend({ | ||
name: 'MySchema', | ||
props: Joi.object().keys({ | ||
prop1: Joi.string(), | ||
prop2: Joi.string() | ||
}), | ||
keys: ['prop1'] | ||
}) | ||
let myModel = MyModel({prop1: 'Hello'}) | ||
myModel.save() | ||
``` | ||
You can (and should) move your DB connection (Shelf) and Schema (returned by the extend method) to different files to get better readability. | ||
Check the examples for further information. | ||
# Contributing | ||
We use [standard js](https://github.com/feross/standard). | ||
In order to run the tests you should have an Redis instance running locally. | ||
<p align="center"> | ||
<img alt="Database for | ||
Frontend Developers" src="https://sid.studio/assets/shelf-cover.png"/> | ||
<br/><br/> | ||
<a href="https://sid.studio/shelf/">sid.studio/shelf</a> | ||
</p> |
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
0
0
2
330
2
0
7
2
- Removedasync@^2.0.0-rc.5
- Removedhiredis@^0.4.1
- Removedjoi@^7.2.3
- Removedlodash@^4.12.0
- Removedredis@^2.4.2
- Removedasync@2.6.4(transitive)
- Removedbindings@1.5.0(transitive)
- Removeddouble-ended-queue@2.1.0-0(transitive)
- Removedfile-uri-to-path@1.0.0(transitive)
- Removedhiredis@0.4.1(transitive)
- Removedhoek@3.0.44.3.1(transitive)
- Removedisemail@2.2.1(transitive)
- Removedjoi@7.3.0(transitive)
- Removedlodash@4.17.21(transitive)
- Removedmoment@2.30.1(transitive)
- Removednan@2.22.0(transitive)
- Removedredis@2.8.0(transitive)
- Removedredis-commands@1.7.0(transitive)
- Removedredis-parser@2.6.0(transitive)
- Removedtopo@2.1.1(transitive)