Skip to content

Instantly share code, notes, and snippets.


Boris Serdiuk just-boris

View GitHub Profile
just-boris / demo.ts
Created Oct 13, 2020
Nested weak map
View demo.ts
import { NestedWeakMap } from './nested-weak-map';
const key1 = {};
const key2 = {};
const map = new NestedWeakMap();
map.get([key1, key2]); // undefined
map.getOrCreate([key1, key2], () => 'default'); // "default"
map.get([key1, key2]); // "default"
View css-loader.js
import path from 'path';
function shouldApply(url) {
return path.extname(url) === '.css';
export function getFormat(url, context, defaultGetFormat) {
if (shouldApply(url)) {
return {
format: 'module',
just-boris / debounce.js
Created May 31, 2020
small debounce implementation without lodash
View debounce.js
export const DEBOUNCE_DEFAULT_DELAY = 200;
export default function debounce(func, delay = DEBOUNCE_DEFAULT_DELAY) {
let timeout;
return function(...args) {
if (timeout) {
timeout = setTimeout(() => {
just-boris /
Last active Aug 30, 2019
Use lint-staged to check file sizes

File size checker

Prevents you from accidentially commenting very big assets. Make sure that you have optimized all your assets.


  1. Add the script to your repo
  2. Configure lint-staged

React Everywhere — Rick Hanlon

Building a Community Around Ignite — Jamon Holmgren

Toolchain for building modular React Native plugins — Ville Immonen

No notes :(

Custom CSS is the path to inconsistent UI — Artem Sapegin


MobX - The Journey — Michel Weststrate

MobX [mob-ex] – reactive updates via subscriptions.

How to run an open-source library

  • people do not inspect your source code seriously
  • people are not inspired by your ideas and solutions as you are
  • project without a critical mass of users does not look very attractive
just-boris / .gitignore
Last active Jan 22, 2019
React scoped styling options
View .gitignore
just-boris / .gitignore
Last active Aug 8, 2020
Shadow DOM as a React component:
View .gitignore
just-boris / allure.js
Created Apr 18, 2017
Allure grunt plugin
View allure.js
module.exports = grunt => {
const allure = require('allure-commandline');
grunt.registerMultiTask('allure', 'Passes commands to allure-commandline', function() {
const done = this.async();
const options = this.options();
const args = [];
if( === 'generate') {
if(options.clean) {
just-boris / index.js
Created Feb 5, 2017
Testcase for fast-memoize and webpack
View index.js
import memoize from 'fast-memoize';
function sum(a, b) {
return a + b;
const memoSum = memoize(sum);
console.log(sum(1, 2));
You can’t perform that action at this time.