HANDEV
close
프로필 배경
프로필 로고

HANDEV

  • 분류 전체보기 (31)
    • Front-End (10)
      • JavaScript (7)
      • Vue.js (0)
      • React.js (1)
      • Function (2)
    • Back-End (0)
      • Java (0)
    • Network (8)
      • Network (1)
      • Socket (7)
    • Data Analysis (1)
      • Web Crawling (1)
    • Algorithm (1)
    • Coding Test (3)
    • Error (8)

Object를 Array로 변환

Tree 형태의 Object를 하나의 Array로 변환하는 함수이다. /* 변환 전 parent : { a : a, children : [{b : b}, {c : c}] } 변환 후 [{a, a}, {b : b}, {c : c}] */ function convertObjectToArray(tree) { const list = []; function pushItem(node) { if (!node) return; node.forEach(item => { list.push(item); const childrenKeyList = Object.keys(item).filter(key => Array.isArray(item[key])); if (childrenKeyList.length > 0) { childrenK..

  • format_list_bulleted Front-End/Function
  • · 2023. 8. 9.
  • textsms

파일 다운로드

1. GET으로 파일 다운로드function download(downloadUrl, filename) { const element = document.createElement('a'); element.setAttribute('href', downloadUrl); element.setAttribute('download', filename); document.body.appendChild(element); element.click(); document.body.removeChild(element);} 2. POST으로 파일 다운로드function download(downloadUrl, param, fileName) { const req = new XMLHttpRequest(); req.op..

  • format_list_bulleted Front-End/Function
  • · 2023. 5. 16.
  • textsms
  • navigate_before
  • 1
  • navigate_next
전체 카테고리
  • 분류 전체보기 (31)
    • Front-End (10)
      • JavaScript (7)
      • Vue.js (0)
      • React.js (1)
      • Function (2)
    • Back-End (0)
      • Java (0)
    • Network (8)
      • Network (1)
      • Socket (7)
    • Data Analysis (1)
      • Web Crawling (1)
    • Algorithm (1)
    • Coding Test (3)
    • Error (8)
최근 글
인기 글
태그
  • #javascript
  • #Linux_Socket
  • #백준
전체 방문자
오늘
어제
전체
Copyright © 쭈미로운 생활 All rights reserved.
Designed by JJuum

티스토리툴바