@tipe/databox-loader
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "@tipe/databox-loader", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Tipe Databox Loader for talking with Databox", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -1,2 +0,23 @@ | ||
# tipe-databox-loader | ||
# Databox Loader | ||
Tipe Databox Loader for talking with Databox | ||
```bash | ||
yarn add @tipe/databox-loader | ||
``` | ||
```javascript | ||
const DATABOX_URL = process.env.DATABOX_URL | ||
const databox = createDatabox(DATABOX_URL) | ||
const query = {} | ||
databox.user.create(query) | ||
/* | ||
// return data | ||
{ | ||
data: {}, | ||
errors: [] | ||
} | ||
*/ | ||
``` |
@@ -52,3 +52,3 @@ const fetch = require('node-fetch') | ||
if (orm[model][action] === undefined) { | ||
orm[model][action] = databoxFetch.bind(url, model, action) | ||
orm[model][action] = databoxFetch.bind(null, url, model, action) | ||
} | ||
@@ -63,3 +63,3 @@ }) | ||
const databox = createDatabox() | ||
const databox = createDatabox(URI) | ||
@@ -66,0 +66,0 @@ const query = {} |
const create = require('./create') | ||
module.exports = function(url, models, actions) { | ||
function createDatabox(url, models, actions) { | ||
return create(url, models, actions) | ||
} | ||
createDatabox.createDatabox = createDatabox | ||
createDatabox['default'] = createDatabox | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
module.exports = createDatabox |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
100921
8
111
24