You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pastebin/nginx/public_html/models.js

20 lines
272 B
JavaScript

function bin(o){
const b = {};
b.id = o.id;
b.name = o.name || b.id;
b.user_id = o.user_id || '';
return b;
}
function note(o){
const n = {};
n.id = o.id;
n.text = o.text || '';
n.modified = o.modified || 0;
return n;
}
export {
bin,
note
}