Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement cut operator #205

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Lonli-Lokli
Copy link

@Lonli-Lokli Lonli-Lokli commented Jun 9, 2022

Description

useful addition when split-map should work for all cases

Checklist for a new method

  • Create a directory for the new method in the src directory in param-case
  • Place the source code to src/method-name/index.ts in ESModules export in camelCase named export
  • Add tests to src/method-name/method-name.test.ts
  • Add fork tests to src/method-name/method-name.fork.test.ts
  • Add type tests to test-typings/method-name.ts
    • Use // @ts-expect-error to mark expected type error
    • import { expectType } from 'tsd' to check expected return type
  • Add documentation in src/method-name/readme.md
    • Add header Patronum/MethodName
    • Add section with overloads, if have
    • Add Motivation, Formulae, Arguments and Return sections for each overload
    • Add useful examples in Example section for each overload
  • Add section to README.md in the repository root
    • Add method to the table of contents into correct category - [MethodName](#methodname) - description.
    • Add section ## MethodName
    • Add [Method documentation & API](/src/method-name) into section
    • Add simple example

@sergeysova
Copy link
Member

Thank you for contribution!

But it looks like it is better to add support of Event for reshape.

At the moment reshape receives Store and returns stores. Maybe add support for Event as source and return value?

@sergeysova sergeysova changed the title feat: add cut operator Implement cut operator Aug 30, 2022
@sergeysova sergeysova added feature New functionality needs triage labels Aug 30, 2022
@github-actions
Copy link

github-actions bot commented Oct 7, 2022

🚛 size-compare report

Comparing b4ae6d54...b4ae6d54

Files wasn't changed
File +/- Base Current +/- gzip Base gzip Current gzip
dist/and/index.cjs = 400 B 400 B = 250 B 250 B
dist/and/index.js = 415 B 415 B = 246 B 246 B
dist/babel-preset.cjs = 434 B 434 B = 249 B 249 B
dist/combine-events/index.cjs = 2.46 kB 2.46 kB = 843 B 843 B
dist/combine-events/index.js = 3.43 kB 3.43 kB = 1.15 kB 1.15 kB
dist/condition/index.cjs = 1.37 kB 1.37 kB = 508 B 508 B
dist/condition/index.js = 1.29 kB 1.29 kB = 461 B 461 B
dist/debounce/index.cjs = 3.11 kB 3.11 kB = 1.09 kB 1.09 kB
dist/debounce/index.js = 3.07 kB 3.07 kB = 1.08 kB 1.08 kB
dist/debug/index.cjs = 8.26 kB 8.26 kB = 2.4 kB 2.4 kB
dist/debug/index.js = 8.79 kB 8.79 kB = 2.5 kB 2.5 kB
dist/delay/index.cjs = 1.76 kB 1.76 kB = 710 B 710 B
dist/delay/index.js = 1.81 kB 1.81 kB = 703 B 703 B
dist/either/index.cjs = 527 B 527 B = 308 B 308 B
dist/either/index.js = 405 B 405 B = 242 B 242 B
dist/empty/index.cjs = 176 B 176 B = 152 B 152 B
dist/empty/index.js = 79 B 79 B = 89 B 89 B
dist/equals/index.cjs = 337 B 337 B = 249 B 249 B
dist/equals/index.js = 221 B 221 B = 179 B 179 B
dist/every/index.cjs = 1.22 kB 1.22 kB = 516 B 516 B
dist/every/index.js = 1.08 kB 1.08 kB = 445 B 445 B
dist/format/index.cjs = 647 B 647 B = 367 B 367 B
dist/format/index.js = 691 B 691 B = 369 B 369 B
dist/in-flight/index.cjs = 644 B 644 B = 358 B 358 B
dist/in-flight/index.js = 548 B 548 B = 307 B 307 B
dist/index.cjs = 1.57 kB 1.57 kB = 359 B 359 B
dist/index.js = 1.09 kB 1.09 kB = 279 B 279 B
dist/interval/index.cjs = 3.89 kB 3.89 kB = 1.14 kB 1.14 kB
dist/interval/index.js = 3.75 kB 3.75 kB = 1.13 kB 1.13 kB
dist/macro.cjs = 1.91 kB 1.91 kB = 808 B 808 B
dist/not/index.cjs = 162 B 162 B = 148 B 148 B
dist/not/index.js = 69 B 69 B = 81 B 81 B
dist/or/index.cjs = 396 B 396 B = 249 B 249 B
dist/or/index.js = 413 B 413 B = 246 B 246 B
dist/patronum.cjs = 17.1 kB 17.1 kB = 5.48 kB 5.48 kB
dist/patronum.js = 14.8 kB 14.8 kB = 5.37 kB 5.37 kB
dist/patronum.umd.js = 18 kB 18 kB = 5.59 kB 5.59 kB
dist/pending/index.cjs = 914 B 914 B = 496 B 496 B
dist/pending/index.js = 830 B 830 B = 444 B 444 B
dist/reset/index.cjs = 325 B 325 B = 208 B 208 B
dist/reset/index.js = 249 B 249 B = 157 B 157 B
dist/reshape/index.cjs = 422 B 422 B = 244 B 244 B
dist/reshape/index.js = 381 B 381 B = 205 B 205 B
dist/snapshot/index.cjs = 758 B 758 B = 347 B 347 B
dist/snapshot/index.js = 641 B 641 B = 288 B 288 B
dist/some/index.cjs = 1.17 kB 1.17 kB = 477 B 477 B
dist/some/index.js = 1.03 kB 1.03 kB = 409 B 409 B
dist/split-map/index.cjs = 630 B 630 B = 361 B 361 B
dist/split-map/index.js = 575 B 575 B = 319 B 319 B
dist/spread/index.cjs = 1.26 kB 1.26 kB = 537 B 537 B
dist/spread/index.js = 1.28 kB 1.28 kB = 519 B 519 B
dist/status/index.cjs = 428 B 428 B = 266 B 266 B
dist/status/index.js = 339 B 339 B = 208 B 208 B
dist/throttle/index.cjs = 1.58 kB 1.58 kB = 668 B 668 B
dist/throttle/index.js = 1.52 kB 1.52 kB = 628 B 628 B
dist/time/index.cjs = 722 B 722 B = 376 B 376 B
dist/time/index.js = 623 B 623 B = 321 B 321 B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality needs triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants