Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

hadron-react-bson

Package Overview
Dependencies
Maintainers
29
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hadron-react-bson

Hadron React BSON Components

latest
Source
npmnpm
Version
5.8.0
Version published
Maintainers
29
Created
Source

hadron-react-bson

Hadron React Components for BSON values

Usage

Use the getComponent method to return the correct component for the provided BSON type.

const React = require('react');
const getComponent = require('hadron-react-bson');
const component = getComponent('String');

React.createElement(component, { type: 'String', value: 'testing' });

Require components directly. Note that if a BSON type does not have a specific component, it will be handled by the generic Value component which calls toString on the object.

const {
  BinaryValue,
  CodeValue,
  DateValue,
  Value,
  DoubleValue,
  Int32Value,
  KeyValue,
  RegexValue,
  DBRefValue
} = require('hadron-react-bson');

Keywords

mongodb-js

FAQs

Package last updated on 25 Feb 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