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

dynogels-promise

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynogels-promise

Promisified dynogels module

  • 1.0.21
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

dynogels-promise

This package was created for two main reasons:

  1. the maintainer of dynogels has not fixed a vulnerability that exists in the package eventhough a PR has been submitted for fixing that close to year now. See here

  2. The promisified version, dynogels-promisified of that package also has outdated dependencies. The PR submitted there is also almost a year.

The projects are great, so decided to combine the both projects and deploy it as dynogels-promise

Installation

> npm install dynogels-promise

Usage

All methods available in dynogels have been promisified and and can be assessed under the same name

Also Async versions of the methods that were available in dynogels-promisified are also available for backward-compatibility. So you can replace dynogels-promisified with this package, and will still work perfectly.

const dynogels = require('dynogels-promise')

const Todo = dynogels.define('Todo', {
  timestamps: true,
  hashKey: 'id',
  schema: {
    id: joi.string().required(),
    done: joi.boolean.default(false),
    content: joi.string().required()
  }
})

//=> Create Todo
const newTodo = await Todo.create({ id: uuid(), content: 'Write this doc' })
const newTodo = await Todo.createAsync({ id: uuid(), content: 'Write this doc' }) // backward compatibility

//=> Get a Todo item
const todo = await Todo.get('4549b30d-4a4a-4230-82d4-3286c9348d24')
const todo = await Todo.getAsync('4549b30d-4a4a-4230-82d4-3286c9348d24') // backward compatibility

Keywords

FAQs

Package last updated on 22 Mar 2021

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