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

mongo-iots-wrapper

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongo-iots-wrapper

Strongly typed MongoDB

  • 0.0.12
  • npm
  • Socket score

Version published
Weekly downloads
14
decreased by-6.67%
Maintainers
2
Weekly downloads
 
Created
Source

Mongo io-ts wrapper

Build Status code style: prettier Known Vulnerabilities

Strongly typed mongod db with runtime validation and typescript intellisense.

Usage

Define your interfaces with io-ts

import * as t from 'io-ts';

const User = t.interface({
    dateCreated: t.number;
    name: t.string;
    email: t.string;
});

Use mongo wrapper to define users collection

const mongoClient = mongoWrapper({
    Collections: {
        users: User
    }
});

Get intellisense

intellisense-preview

Get runtime validation

Invalid value "NotANumber" supplied to : { email: string , dateCreated: number, password: string }/dateCreated: number

Keywords

FAQs

Package last updated on 28 Jan 2018

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