
일단 노드 환경이라는 전제하에 test debugger하는 방법을 작성한다 jest test 패키지를 설치했다면 node_modules라는 폴더에도 생성되었을 것이다 local install이기 때문에 .bin 파일에 생성되었다 node_modules/.bin/jest 브라우저 chrome://inspect 로 들어간 뒤 Open dedicated DevTools for Node 누름. 누르면 인스펙터 가 나온다 vscode(내가 쓰는 코드 에디터..)에서 debugger을 원하는 위치에 넣는다 node --inspect node_modules/.bin/jest --watch --runInBand 하면 jest test debugger이 크롬에서 확인이 가능하다! 물론 디버거 안하면서 test돌리면 좋겠..
dependencies는 의존성이다 해당 프로젝트를 개발할 때 필요한 의존성을 devDependencies에 정의하고 그렇지 않은 의존성은 dependencies에 정의한다 dependencies는 아무 옵션을 주지 않으면 리스트에 추가가 된다 dependencies : 어플리케이션 운용에 필요하다, 실제 상품에서 사용할 패키지(런타임에도 계속 쓰이는 것) devDependencies : 로컬 개발 및 테스트에만 필요한 개발용 패키지(어떤 Library가 프로젝트의 컴파일(빌드) 타임에 필요시)
_.endsWith _.endsWith = function(string, target, position = string.length) { const isArrayEnd = string.split('').slice(position-1); if(isArrayEnd.includes(target)) { return true; } return false; } _.pad _.pad = function(string, length, chars = ' ') { const betWeenSpace = length/2; if(length % 2 === 0) { string = chars + string + chars; } return string; } _.replace _.replace = function(string='',..
_.assign _.assign = function(object, ...sources) { let result; for(let key in sources) { sources[key].constructor.call(object); } result = object; return result } _.assignIn _.assignIn = function(object, ...sources) { let result = []; for(let key in sources) { for(let param in sources[key]){ sources[key].constructor.call(object); result[param] = object[param]; if(sources[key].constructor.prototy..
_.curry _.curry = function(func) { let result = []; let funcCall = func.call(arguments); function next(nextFunc) { result.push(nextFunc); if (result.length === funcCall.length) { return func.apply(null,result); } if(result[0].length === funcCall.length) { result.shift(); } return function(nextFunc) {return next(nextFunc)} ; } return next(funcCall); } _.defer _.defer = function(func, args) { setT..
lodash는 자바스크립트에서 인기있는 라이브러리 중 하나이다. 그 중 Array 관련 함수를 작성해보았다. _.concat _.concat = function() { let result = []; for(let i = 0; i < arguments.length; i++) { if(Array.isArray(arguments[i])) { for(let key of arguments[i]) { result.push(key); } } else { result.push(arguments[i]); } } return result; } _.difference _.difference = function(array,value) { let result = []; for(let i = 0; i < value.length;..
- if문 중첩없애기
- 무조곤 비공개
- 게임은 더못만든다
- 타입스크립트 프로그래밍
- httponly cookie
- 프로토타입 체인
- react 공식문서
- MDN 참조
- 콜백함수에서의 this
- 복수는 한번에 안댐
- while문활용
- 이 쉬운걸 4시간동안....
- 화살표함수에서 this의 바인딩
- 중복숫자찾기
- 객체의 참조값
- https://www.ncloud.com/support/notice/all/1424
- 문자열실수변경
- 메서드오버라이드
- 한번에 받는건 id로 받기
- debugger라도 해서 다풀어버리자
- 지뢰찾기 게임도 못하는데
- .fill
- refresh token
- NextJS13
- 배열단순값 객체엔 속성값
- 생성자함수에서의 this
- 무조건 비공개..
- 틀리면 말씀해주세요
- login연장
- var과 let의 차이
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |