What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-03-22 01:15:03
adonisjs delete rollback transaction
'use strict'; class SafeDelete { register(Model, customOptions = {}) { const defaultOptions = {}; const options = Object.assign(defaultOptions, customOptions); const safeDelete = async function(trx) { return trx .from(Model.ta... Add solution -
Javascript 2022-03-18 07:30:11
reverse keys and values in object javascript
//The concise way by using ES6 syntax like this. const obj = {A : 1, B : 2, C : 3, D : 4} function objectFlip(obj) { return Object.entries(obj).reduce((acc, [key, value]) => (acc[value] = key, acc), {}) } console.log('input: ',obj); console.lo... Add solution
Best helpers
Ranking is empty