Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. function editArticle(id, articleConfig) {
  2.  
  3. var article = getArticleById(id);
  4. if (article === -1) {
  5. return false;
  6. }
  7.  
  8. Object.keys(articleConfig).forEach(function (key) {
  9. if (article[key] && isArticleKeyChangeable(key)) {
  10. article[key] = articleConfig[key];
  11. }
  12. });
  13.  
  14. if(validateArticle(article)) {
  15. return article;
  16. }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement