Skip to content

Instantly share code, notes, and snippets.

View sergeysova's full-sized avatar
👋
Open to network

Sova sergeysova

👋
Open to network
View GitHub Profile
@sergeysova
sergeysova / disposable.ts
Created August 9, 2024 19:45 — forked from 7iomka/disposable.ts
Disposable
/* eslint-disable consistent-return */
/* eslint-disable effector/mandatory-scope-binding */
/* eslint-disable effector/no-watch */
import type { Node } from 'effector';
import {
clearNode,
attach,
// combine,
createEffect,
createNode,
import { Plugin } from 'prosemirror-state'
import { Node } from 'prosemirror-model'
import { Decoration, DecorationSet } from 'prosemirror-view'
function checkLength(doc: Node, maxLength: number) {
if (doc.nodeSize > maxLength) {
const elem = document.createElement('span')
return DecorationSet.create(doc, [
Decoration.inline(maxLength, doc.nodeSize, { class: 'bg-red-300' }),
])
@sergeysova
sergeysova / Routing Cases.md
Created October 7, 2022 13:31
atomic router cases

Cases for router

Exact word vs parametrised

Routes

/posts
/posts/new
/posts/:postId
{
"size-compare": 0,
"history": [
{
"unixtimestamp": 1694522343977,
"commitsha": "977633419ce9ee30c64dead3d74380f51a3e59b3",
"files": {
"dist/and/index.cjs": {
"raw": 397,
"gzip": 251
@sergeysova
sergeysova / history.json
Last active March 2, 2023 08:38
effector reflect size compare
{
"size-compare": 0,
"history": [
{
"unixtimestamp": 1677746323334,
"commitsha": "ee90926afb49ef6a8cf9524017ba81e276b005b2",
"files": {
"reflect.cjs.js": {
"raw": 5229,
"gzip": 1584
@sergeysova
sergeysova / README.md
Last active October 6, 2022 14:54
Size-compare for effector/size-compare

This is the readme file for the size-compare repo size check