Title: Add test cases by XiaoWinter · Pull Request #1 · javascript-plunk/javascript-tutorial-en · GitHub
Open Graph Title: Add test cases by XiaoWinter · Pull Request #1 · javascript-plunk/javascript-tutorial-en
X Title: Add test cases by XiaoWinter · Pull Request #1 · javascript-plunk/javascript-tutorial-en
Description: I found a throttling method in the comments section that passed all the current tests but was wrong.So I added a test case to find this type of error.With this wrapping method, if the interval between two calls is greater than 1000ms, the wrapped method becomes invalid. function throttle(func, period) { let savedArgs let savedThis let start = true function runFunc() { if (savedArgs) { func.apply(savedThis, savedArgs) savedArgs = undefined setTimeout(runFunc, period) } } function wrapper(...rest) { savedThis = this savedArgs = rest if (start) { start = false runFunc() } } return wrapper }
Open Graph Description: I found a throttling method in the comments section that passed all the current tests but was wrong.So I added a test case to find this type of error.With this wrapping method, if the interval bet...
X Description: I found a throttling method in the comments section that passed all the current tests but was wrong.So I added a test case to find this type of error.With this wrapping method, if the interval bet...
Opengraph URL: https://github.com/javascript-plunk/javascript-tutorial-en/pull/1
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:7e23b04a-9538-a3a8-a4cf-5952204cbb53 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | A00E:174846:95120:CC31F:697744D7 |
| html-safe-nonce | 140d501ceb39767c856eef5e475dcadcea1c4bfcf0411e032d69a2cc537bc411 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDBFOjE3NDg0Njo5NTEyMDpDQzMxRjo2OTc3NDRENyIsInZpc2l0b3JfaWQiOiI3MzI1OTE5NDU2NDk0MzA2NTE5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7cea5f054514ff16c198fb4c3dd5e26794943641cbd82c4f896237cab6f5dd51 |
| hovercard-subject-tag | pull_request:560475801 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/javascript-plunk/javascript-tutorial-en/pull/1/checks |
| twitter:image | https://avatars.githubusercontent.com/u/41815901?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/41815901?s=400&v=4 |
| og:image:alt | I found a throttling method in the comments section that passed all the current tests but was wrong.So I added a test case to find this type of error.With this wrapping method, if the interval bet... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 01d198479908d09a841b2febe8eb105a81af2af7d81830960fe0971e1f4adc09 |
| turbo-cache-control | no-preview |
| go-import | github.com/javascript-plunk/javascript-tutorial-en git https://github.com/javascript-plunk/javascript-tutorial-en.git |
| octolytics-dimension-user_id | 9218487 |
| octolytics-dimension-user_login | javascript-plunk |
| octolytics-dimension-repository_id | 104978456 |
| octolytics-dimension-repository_nwo | javascript-plunk/javascript-tutorial-en |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 93253246 |
| octolytics-dimension-repository_parent_nwo | javascript-tutorial/en.javascript.info |
| octolytics-dimension-repository_network_root_id | 93253246 |
| octolytics-dimension-repository_network_root_nwo | javascript-tutorial/en.javascript.info |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d37e99eca9fba24ee37da98481d573461cc1ab7d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width