New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

klein

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

klein - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

auto.js

2

package.json
{
"name": "klein",
"version": "1.0.2",
"version": "1.1.0",
"description": "A small ORM that combines ImmutableJS and knex",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -37,5 +37,24 @@ # Klein

The easiest init is:
```javascript
// Assumes that process.env.DATABASE_URL is set
const Klein = require('klein/auto');
```
But if you need to specify a database URL:
```javascript
const Klein = require('klein').connect(process.env.DATABASE_URL);
```
Or, if you already have an instanciated `knex` object:
```javascript
const Klein = require('klein').connect(knex);
```
Then you can define a model:
```javascript
const Users = Klein.model('users');

@@ -250,1 +269,6 @@ ```

```
## TODO
* Model validations
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