Socket
Socket
Sign inDemoInstall

bookshelf-case-converter-plugin

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bookshelf-case-converter-plugin

A plugin for Bookshelf that converts between the database's snake_cased and a model's camelCased properties automatically.


Version published
Weekly downloads
165
decreased by-14.06%
Maintainers
1
Install size
1.35 MB
Created
Weekly downloads
 

Readme

Source

Bookshelf Case Converter Plugin

Build Status Greenkeeper badge

This is a plugin for the Bookshelf Node.js ORM that handles the conversion between the database's snake_cased and a model's camelCased properties automatically.

How to use

First install the package:

npm install bookshelf-case-converter-plugin

Then load the plugin using bookshelf.plugin('bookshelf-case-converter-plugin'). No further action is required, since the plugin will automatically convert model attributes between snake_case and camelCase.

Limitations

Note that there are some limitations to the way this plugin works. When you access query methods directly, there will be no conversion, meaning that you have to use the actual database column names in this case. The following methods do no work with this plugin yet:

Keywords

FAQs

Last updated on 07 Jun 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc