Skip to content

Instantly share code, notes, and snippets.

View yujintang's full-sized avatar
🇨🇳
保家卫国中...

大仁庄小余 yujintang

🇨🇳
保家卫国中...
  • 上海
View GitHub Profile
{
"workbench.colorTheme": "Dracula",
"files.autoSave": "onFocusChange",
"terminal.explorerKind": "external",
"workbench.panel.defaultLocation": "right",
"workbench.statusBar.feedback.visible": false,
"window.zoomLevel": 0,
"editor.tabSize": 2
}
#!/bin/bash
base=(a b c)
symbols=($(echo "$base"))
function checkarg {
if [ $# -gt 0 ]; then
symbols=($(echo "$@"))
else
symbols=($(echo "$base"))
const promisify = require('util').promisify;
module.exports = function promisifyAll(obj) {
for(const key in obj){
if(obj.hasOwnProperty(key)){
obj[key + 'Async'] = promisify(obj[key]);
}
}
};