This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const asyncSequentializer = (() => { | |
const toPromise = (x) => { | |
if(x instanceof Promise) { // if promise just return it | |
return x; | |
} | |
if(typeof x === 'function') { | |
// if function is not async this will turn its result into a promise | |
// if it is async this will await for the result | |
return (async () => await x())(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Title: Summary, imperative, start upper case, don't end with a period | |
# No more than 50 chars. #### 50 chars is here: # | |
:emoji: <Type> [Title info] | |
# Remember blank line between title and body. | |
# Body: Explain *what* and *why* (not *how*). Include task ID (Jira issue). | |
# Wrap at 72 chars. ################################## which is here: # | |
<Body> | |
# At the end: Include Co-authored-by for all contributors. | |
# Include at least one empty line before it. Format: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ListTile( | |
leading: Image.network(memorabiliaList[index].photo), | |
title: Text( | |
memorabiliaList[index].title, | |
style: const TextStyle( | |
fontWeight: FontWeight.bold, | |
), | |
), | |
subtitle: Text( | |
memorabiliaList[index].description, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// vue.config.js | |
module.exports = { | |
publicPath: "./", | |
productionSourceMap: false, | |
pages: { | |
client: { | |
entry: "src/client/main.js", | |
template: "public/index.html", | |
filename: "client.html", | |
title: "SHAREit", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @description 将时间转换成指定格式 | |
* @param {String|Number} time | |
* @param {String} fmt | |
*/ | |
export function timesToDate(time, fmt) { | |
fmt = fmt || 'yyyy-MM-dd'; | |
time = anyTotime(time); | |
let date = new Date(time); | |
if (/(y+)/.test(fmt)) { |