Skip to content
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.

Latest commit

 

History

History
22 lines (21 loc) · 538 Bytes

CONTRIBUTING.md

File metadata and controls

22 lines (21 loc) · 538 Bytes

JS guidelines

  1. All anonymous functions must be arrow functions.
    // This is ok
    utils.ajaxGet('/ajax/episode/info', params)
      .then(resp => {
        resolve(JSON.parse(resp))
      })
      .catch(err => {
        reject(err)
      })
      
    // This is NOT ok. Arrow functions looks
    // much cleaner for this purpose.
    utils.ajaxGet('/ajax/episode/info', params)
      .then(function(resp){
        resolve(JSON.parse(resp))
      })
      .catch(function(err){
        reject(err)
      })