Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Copyright IBM Corp. 2016,2018. All Rights Reserved.
// Node module: loopback-connector-kv-redis
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
'use strict';
const SG = require('strong-globalize');
SG.SetRootDir(__dirname + '/..');
const g = SG();
const assert = require('assert');
const connectorCore = require('loopback-connector');
const Connector = connectorCore.Connector;
const ModelKeyComposer = connectorCore.ModelKeyComposer;
const BinaryPacker = connectorCore.BinaryPacker;
const JSONStringPacker = connectorCore.JSONStringPacker;
const debug = require('debug')('loopback:connector:kv-redis');
const Redis = require('ioredis');
const util = require('util');
/**
* @module loopback-connector-kv-redis
*
* Initialize the KeyValue Redis connector against the given data source.
*
* @param {DataSource} dataSource The `loopback-datasource-juggler` dataSource.
* @callback {Function} callback
* @param {Error} err Error Object.
*
* @header RedisKeyValueConnector.initialize(dataSource, cb)