1.0.5 • Published 6 years ago

bookshelf-strip-save v1.0.5

Weekly downloads
9
License
MIT
Repository
github
Last release
6 years ago

Bookshelf Strip Save

This plugin works with Bookshelf.js, available here http://bookshelfjs.org. This plugin will automatically strip any attributes set on a model that's not the name of a column of its associated table before it's saved. This is useful for example if you are receiving "dirty" data.

It does this by relying on bookshelf-column-cache to check for a whitelist of valid column names.

requires async syntax to work.

Installation

npm install bookshelf-strip-save bookshelf-column-cache

Then in your bookshelf configuration:

var bookshelf = require('bookshelf')(knex);
bookshelf.plugin(require('bookshelf-strip-save');
bookshelf.plugin(require('bookshelf-column-cache');
1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

7 years ago

1.0.1

8 years ago

1.0.0

8 years ago