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

@juniper-tech/core

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@juniper-tech/core

Common utilities for Juniper Tech models, events and actions.

  • 0.1.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@juniper-tech/core

Usage

... work in progress

Kafka Topic Consumption

We use kafkajs in the core library to generate and process messages in topics.

import { JuniperKafka, JuniperConsumer } from '@juniper-tech/core'

const kafka = JuniperKafka(process.env.KAFKA_BROKERS || '', 'juniper-ingest-client', 2)

const consumer = await JuniperConsumer(kafka, 'nodejs-dev', null)

Sensor Model Interaction

We use sequelize to interact with tables and have conveniently abstracted out the model creation so you can import into your own package.

// Sequelize connection is the sequelize instance of your db
import SequelizeConnection from '../sequelize-connection'
import { SensorModel } from '@juniper-tech/core'


let sensorPg = SensorModel(DB)

// this is now a standard sequelize model and can be used like one
sensorPg.bulkCreate(data as any).catch((err:any) => {
  console.error('error', err)
})

FAQs

Package last updated on 02 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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