##사용하기
- 기본 사용법: basic.md
- 좀더 발전된 사용법: advanced.md
- 환경 설정하기: configuring-vim.md
##사용하기
// ==== space test ==== | |
let logL = {}; | |
logL.deb = false; | |
logL.inf = false; | |
const attrStrTest = 'class= "test clazz" readonly title=test!! class="test clazz" style= "width : 150px ;height:50px"'; | |
//getAttrList(attrStrTest); | |
const getAttrList = (attrStr) => { |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>76-1</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
.circle-1 { | |
position: relative; |
# |
const makeArr = (s, max)=> { | |
let res = []; | |
for (let i = s; i <= max; i++) { | |
res.push(i); | |
} | |
return res; | |
}; | |
console.log(makeArr(1, 10)); | |
const err = e=>{throw e;}; | |
const testF = (f, vList, logTitle = 'test')=>{ |
const arrayStringify = (arr => { | |
const quote = str=>`\"${str}\"`; | |
const _escape = str=>str.replace(/\"/g,'\\\"'); | |
const NULL_STR = 'null'; | |
const _arrayStringify = (arr) => { | |
let acc = []; | |
for (const item of arr) { | |
//const item = obj[k]; | |
//console.log('k', k, 'item', item); | |
//console.log('item', item); |
const stringify89_3_210413 = (arr => { | |
// utils ==================================================== | |
const isDebug =_=>!1; | |
const quote = str=>`\"${str}\"`; | |
const _escape = { | |
table: [[/\"/g,'\\\"'] | |
,[/\t/g, '\\t'] | |
,[/[\r]/g, '\\r'] | |
,[/[\n]/g, '\\n'] |
if ('과제 - 단수 obj stringify') { | |
Object.entries({}); //허용, 안쓰는 거 추천 | |
` | |
const abc = {_1:3, b:"abc"}; //[] x, {} x | |
stringify(abc)==JSON.stringify(abc) | |
` | |
} | |
const stringify89_4_210420 = (obj => { | |
// utils ==================================================== |
if ('과제 1 - generator 는 습득이 0인 것 같아요....') { | |
let i = 0; | |
const copy = iter=>{ | |
iter.filter = (block)=>copy((function*(){ | |
for(const v of iter){ | |
i++; | |
if(block(v)) yield v; | |
console.log('filter skip', v); | |
} |
if ('과제 210504 6강 끝나고 과제') { | |
` | |
과제 1 - 모든 값 타입을 인식하여 파싱하는 중첩된 배열 문자열 파서 | |
"[2, \"ㄹㅏㄹ\", [2, \"ㅕㅕ\"], [3, "4"]]" | |
과제 2 - 나만의 클래스타입을 인식하여 해당 클래스의 인스턴스를 만들어 넣어주는 기능 추가 | |
과제 3 - 기존 작성한 stringify 가 오브젝트인 경우 toJSON을 구현하고 있으면 그걸 이용해 stringify가 되도록 보수 | |
과제 4 - date의 json인 경우 date로 복원한다 | |
----> new Date().toJSON() | |
"2021-04-27T14:26:57.816Z" |