main.js
var mo =require("./hi");
hi.js
exports.A=function(){}
module.exports = {
A : fucntion(){}
}
module.exports는 개별 함수가 아닌 객체를 통째로 exports할 때 사용하라고 나와있다
moduel require은 한번만 실행한다.
exports로 공개한 모듈은 객체 생성하는게아니라 캐시로 저장됨
-> 다른 곳에서 다시 사용하면 저장된 값을 불러옴
2018년 10월 20일 토요일
flutter 기본 개념 1
Scaffold - 화면 뼈대 역할 - 기본적으로 AppBar body floatingActionButton 같은걸 배치해줌 return Scaffold ( appBar : AppBar ( title : const Text ...
-
Introduction Dynamic Programming (DP) is a fundamental concept in computer science and algorithmic problem-solving. It's a technique tha...
-
Scaffold - 화면 뼈대 역할 - 기본적으로 AppBar body floatingActionButton 같은걸 배치해줌 return Scaffold ( appBar : AppBar ( title : const Text ...
-
도커 상태 확인 현재 실행중인 프로세스 docker ps 실행 했던 프로세스 docker ps -a 설치된 이미지 목록 docker images 도커 이미지 관리 이미지 받아오기 docker pull image이름 이...