This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "info": { | |
| "title": "Threshold Internal API", | |
| "description": "The API is exclusively for internal purposes", | |
| "version": "1.0.0" | |
| }, | |
| "openapi": "3.0.3", | |
| "servers": [ | |
| { | |
| "url": "/internal" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fibanachi = (min, max) => Array(max - min).fill(0) | |
| .reduce((acc, _, index) => [...acc, ...(!index ? [min] : (index !== max - min - 1 ? [acc[index - 1] + 1] : [acc[index - 1] + 1, max])) ], []) | |
| .reduce((acc, num, index) => [...acc, !index ? num : acc[index - 1] + num], []); | |
| console.log(fibanachi(10, 13)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const compose = (...fns) => (value) => | |
| fns.reduceRight((acc, fn) => fn(acc), value); | |
| Math.sqrt(Math.round(parseFloat("143.7"))); | |
| const sqrtUltra = compose( | |
| (value) => `We earned: ${value}`, | |
| (value) => value ** 3, | |
| Math.sqrt, | |
| Math.round, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ES5 | |
| function generateTemplate(template) { | |
| const NAME_PLACEHOLDER = "{{ name }}"; | |
| const GREETING_PLACEHOLDER = "{{ greeting }}"; | |
| return function (greeting) { | |
| return function (name) { | |
| return template | |
| .replace(GREETING_PLACEHOLDER, greeting) | |
| .replace(NAME_PLACEHOLDER, name); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const mockStyle = { | |
| get transform() { | |
| return 'translateX(0) translateY(10px)'; | |
| } | |
| }; | |
| const buildRegex = (type: 'X' | 'Y'): RegExp => | |
| new RegExp(`translate${type}\(\\S*\)`); | |
| const buildTranslate = ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| section.section.faq | |
| +accordeon('Часто задаваемые вопросы', 'Возможно, наши клиенты уже задали интересующий вас вопрос', | |
| [ | |
| { | |
| title: 'Это больно?', | |
| body : 'Конечно. Вы можете воспользоваться услугой обработки диабетической стопы. Перед процедурой мы проводим 4 простых теста на чувствительность: вибрационную, температурную, болевую и тактильную. Если чувствительность нарушена, мы обращаем внимание на эти участки стопы и обрабатываем их с особой осторожностью. Также мы измеряем уровень сахара в крови с помощью аппарата глюкометр. Это не больно и полностью безопасно. Если уровень сахара выше 10, мы не имеем права прикасаться к стопе. Поэтому мы попросим вас снизить уровень глюкозы в крови и запишем на новое удобное время.' | |
| }, | |
| { | |
| title: 'У меня сахарный диабет. Я могу пойти к подологу?', | |
| body : 'Конечно. Вы можете воспользоваться услугой обработки диабетической стопы. Перед процедурой мы проводим 4 простых теста на чувствительность: вибрационную, температурную, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mixin accordeon(header, description, items, expandedRequired, expandedIndex) | |
| .container | |
| h2.white-text.text-center.mb-3= header | |
| p.h4-title.text-center.d-none.d-md-block.mb-5= description | |
| #accordion.accordion.mt-3 | |
| if expandedRequired | |
| each item, index in items | |
| if index === expandedIndex | |
| .card-header.active(data-toggle='collapse', data-target='#collapse' + index, aria-controls='collapse' + index, aria-expanded='true' id="header" + index) | |
| p.paragraph-text.text-w-bold= item.title |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .checkbox-wrapper | |
| width: 76px | |
| height: 40px | |
| background: green | |
| border-radius: 3em | |
| padding: .3em | |
| position: relative | |
| transition: .25s linear all | |
| transition-duration: 0.1s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .checkbox-wrapper | |
| input(type="checkbox" id="checkbox")/ |
NewerOlder