node-telegram-api/lib/utils.js
mamal72 3f03ff9667 refactored Keyboard and Message class
add Base class
add set and get properties utils
2015-06-28 23:02:18 +04:30

9 lines
289 B
JavaScript

export function setProperties(sourceObject, object) {
sourceObject.properties = Object.assign(sourceObject.properties, object);
return sourceObject;
}
export function getProperties(sourceObject, object) {
return object ? sourceObject.properties[object] : sourceObject.properties;
}