Skip to content

Instantly share code, notes, and snippets.

import { ChevronLeftIcon, ChevronRightIcon } from '@heroicons/react/24/solid'
import clsxm from 'lib/clsxm'
import { FC, HTMLAttributes } from 'react'
type ArrowProps = {
disabled?: boolean
} & HTMLAttributes<HTMLDivElement>
const ArrowButton: FC<ArrowProps> = ({ disabled, className, children }) => {
return (
SC.loadImages = (() => {
function loadImages(urls) {
let abort;
let isAborted = false;
const startTime = Date.now();
const imagesPromise = new Promise((resolve, reject) => {
let tasks = [];
@biirus
biirus / validation.js
Created July 5, 2019 11:36
some async/await test code
const sanitize = (rules, values) => {
return Object.keys(values).reduce(
(values, field) => {
const fieldRules = rules[field];
if (fieldRules) {
values[field] = fieldRules.reduce((val, fn) => fn(val), values[field]);
}
return values;

Keybase proof

I hereby claim:

  • I am biirus on github.
  • I am biirus (https://keybase.io/biirus) on keybase.
  • I have a public key ASBj1J5KvYi8R_22RdoyEhcAV3eMffwvjAzimL9n4bMK3wo

To claim this, I am signing this object:

@biirus
biirus / question_10.js
Last active March 10, 2017 07:28
Q10 #tags: interview
function getObject()
{
return
{
subject: 'Human',
kingdom: 'Animalia',
phylum: 'Chordata',
class: 'Mammalia',
order: 'Primates',
}
@biirus
biirus / question_9.js
Last active March 10, 2017 07:29
Q9 #tags: interview
var child = {
age: 3,
name: 'Ivan',
hello: function () {
console.log(this.name + ', ' + this.age);
}
};
child.hello();
setTimeout(child.hello, 1000);
@biirus
biirus / question_8.js
Last active March 10, 2017 07:29
Q8 #tags: interview
add (5, 2); // 7
add (5)(3); // 8
@biirus
biirus / question_7.js
Last active March 10, 2017 07:29
Q7 #tags: interview
var x = 1;
(function () {
var x = 2;
f();
})();
function f () {
console.log(x);
}
@biirus
biirus / question_6.js
Last active March 10, 2017 07:29
Q6 #tags: interview
var i, btn;
for (i = 0; i < 3; i++) {
btn = $('<input/>', {type: 'button'});
btn.click(function () {
console.log(i);
});
$('body').append(btn);
@biirus
biirus / question_5.js
Last active March 10, 2017 07:29
Q5 #tags: interview
+function () {
var x = a = 2;
}();
console.log(a);
console.log(x);