Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

kevinjie kevinjie

🎯
Focusing
  • Nanjing Jiangsu China
View GitHub Profile
@kevinjie
kevinjie / time.js
Created Apr 8, 2020
[TIME_HANDLER] 时间处理方法 #TIME
View time.js
export const formatNumber = n => {
n = n.toString()
return n[1] ? n : '0' + n
}
export const formatTime = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
const hour = date.getHours()
@kevinjie
kevinjie / http_status.js
Created Apr 8, 2020
[HTTP_STATUS] 常见HTTP状态 #HTTP
View http_status.js
export const HTTP_STATUS = {
SUCCESS: 200,
CREATED: 201,
ACCEPTED: 202,
CLIENT_ERROR: 400,
AUTHENTICATE: 401,
FORBIDDEN: 403,
NOT_FOUND: 404,
SERVER_ERROR: 500,
BAD_GATEWAY: 502,