• This project
    • Loading...
  • Sign in

Chat_Bot / KaKao_ChatBot

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Graphs
  • Network
  • Create a new issue
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • KaKao_ChatBot
  • node_modules
  • std
  • once.js
  • 윤준현's avatar
    UseCallback · 4536b099 ...
    4536b099
    Shit Callback
    윤준현 authored 2018-11-26 21:31:38 +0900
once.js 232 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13
module.exports = function once(fn) {
	var timeout
	var args
	return function() {
		args = arguments
		if (timeout) { return }
		timeout = setTimeout(function() {
			fn.apply(this, args)
			timeout = null
			args = null
		}, 0)
	}
}