* Returns the previous value for key from `_previousDataValues`. * * If called without a key, returns the previous values for all values which have changed * * @param {string} [key] key to get previous value of * * @returns {any|Array<any>}
(key)
| 3794 | * @returns {any|Array<any>} |
| 3795 | */ |
| 3796 | previous(key) { |
| 3797 | if (key) { |
| 3798 | return this._previousDataValues[key]; |
| 3799 | } |
| 3800 | |
| 3801 | return _.pickBy(this._previousDataValues, (value, key) => this.changed(key)); |
| 3802 | } |
| 3803 | |
| 3804 | _setInclude(key, value, options) { |
| 3805 | if (!Array.isArray(value)) value = [value]; |
no test coverage detected