Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tipe/databox-loader

Package Overview
Dependencies
Maintainers
4
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tipe/databox-loader - npm Package Compare versions

Comparing version 0.3.12 to 0.3.13

2

package.json
{
"name": "@tipe/databox-loader",
"version": "0.3.12",
"version": "0.3.13",
"description": "Tipe Databox Loader for talking with Databox",

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

@@ -6,3 +6,3 @@ const fetch = require('node-fetch')

function databoxFetch(url, model, action, body, methods = []) {
function databoxFetch(url, key, model, action, body, methods = []) {
if (action === 'create') {

@@ -14,2 +14,3 @@ console.warn('Please use createMany or createOne')

headers: {
'X-TIPE-AUTH': key,
'Content-Type': 'application/json'

@@ -24,3 +25,3 @@ },

}
module.exports = function createDatabox(url, _models, _actions) {
module.exports = function createDatabox(url, key, _models, _actions) {
_models = _models || models

@@ -35,3 +36,3 @@ _actions = _actions || actions

if (orm[model][action] === undefined) {
orm[model][action] = databoxFetch.bind(null, url, model, action)
orm[model][action] = databoxFetch.bind(null, url, key, model, action)
}

@@ -38,0 +39,0 @@ })

@@ -6,3 +6,3 @@ const createDatabox = require('./create');

beforeEach(() => {
databox = createDatabox('http://url.com', [
databox = createDatabox('http://url.com', 'key', [
'testing',

@@ -9,0 +9,0 @@ 'testing1',

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