UNPKG

nornj-react

Version:

React bindings for NornJ template engine.

27 lines (21 loc) 596 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.debounce = debounce; var _nornj = _interopRequireDefault(require("nornj")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function debounce(fn, delay) { var timeoutID = null; return function () { var _arguments = arguments, _this = this; clearTimeout(timeoutID); timeoutID = setTimeout(function () { fn.apply(_this, _arguments); }, delay); }; } _nornj["default"].assign(_nornj["default"], { debounce: debounce });