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

fjl v2.0 #57

Open
28 of 41 tasks
elycruz opened this issue Nov 28, 2021 · 0 comments
Open
28 of 41 tasks

fjl v2.0 #57

elycruz opened this issue Nov 28, 2021 · 0 comments
Assignees

Comments

@elycruz
Copy link
Member

elycruz commented Nov 28, 2021

Version goals:

  • Better performance, and better ergonimics (idiomatic syntaxes should be used instead of custom implementation ones (E.g., currying, et al.)).

Acceptance Criteria:

Idiomatic Curry

  • Update all 'pseudo' curried methods, in the library, to use idiomatic currying: E.g., instead of const equal$ = curry(equal); should be `const equal$ = a => b => equal(a, b), etc. (latter options is better for readability, performance, and debugging).
  • Add tests for 'curried' methods - will help ensure all curried methods are indeed curried.
  • next - fjl - Remove use of 'curry_' methods from tests and test helpers. #40

Convert methods in:

... and update tests as required:

Slice type removal Allow inferred types

Tickets in this section need consolidating.

  • Replaces overloaded generic/otherwise types with any, and/or allow implicit inference where it makes sense.
    • Turns out typescript has a good inference engine (any). Where things get to hairy, and we need overloaded types, "typings" information should be removed.
  • next: Consolidate generic base types #32
  • next: Replace Slice type with Iterable type  #43
  • [] next: Allow infered types #61
  • All methods that take slices should either take an Indexable, a string, an array, or an interface type, that isn't a 'sum' type, but has it's own definition.
    • Remove Slice type, and it's usages.
      • Remove in sources.
      • Remove in tests.
      • Remove in docs.

Flatten userland 'complexity 0-1' curried methods

Curried methods that have a complexity of 0-1 should just have their definitions declared 'explicitly'; E.g., instead of

const 

  fmap = <T, RetT>(fn: FunctorMapFn<RetT>, x: Functor<T>): Functor<RetT> | Functor => x.map(fn),

  $fmap = <T, RetT>(fn: FunctorMapFn<RetT>) =>
    (x: Functor<T>): Functor<RetT> | Functor =>
      fmap(fn, x)

;

The second declaration should be

// ...
$fmap = <T, RetT>(fn: FunctorMapFn<RetT>, x: Functor<T>): Functor<RetT> | Functor => x.map(fn);

Removing that one layer of indirection provides a small performance bump (in extreme functional cases, et al.).

Perform aforementioned updates for sub packages in repo

  • fjl-validator
  • fjl-inputfilter
  • fjl-validator-recaptcha
  • ...

Repo Level

General

@elycruz elycruz self-assigned this Nov 28, 2021
elycruz added a commit that referenced this issue Jul 30, 2022
elycruz added a commit that referenced this issue Jul 30, 2022
elycruz added a commit that referenced this issue Jul 30, 2022
elycruz added a commit that referenced this issue Jul 30, 2022
elycruz added a commit that referenced this issue Jul 30, 2022
elycruz added a commit that referenced this issue Aug 2, 2022
elycruz added a commit that referenced this issue Aug 3, 2022
…versions - Converted methods upto 'or' method.
elycruz added a commit that referenced this issue Aug 4, 2022
elycruz added a commit that referenced this issue Aug 9, 2022
elycruz added a commit that referenced this issue Aug 9, 2022
elycruz added a commit that referenced this issue Aug 9, 2022
elycruz added a commit that referenced this issue Aug 9, 2022
elycruz added a commit that referenced this issue Aug 9, 2022
elycruz added a commit that referenced this issue Aug 9, 2022
elycruz added a commit that referenced this issue Aug 9, 2022
elycruz added a commit that referenced this issue Aug 9, 2022
…ying, for it's methods.

- Removed 'curry' module imports in 'src/object/', and 'src/function/', modules.
elycruz added a commit that referenced this issue Aug 9, 2022
…account idiomatic curry for it's curried methods.
elycruz added a commit that referenced this issue Aug 9, 2022
…methods.

- Removed 'Curry*' types from 'native' types module.
elycruz added a commit that referenced this issue Aug 10, 2022
…re type is defined (needed to quickly find other usages (via IDE, etc.)).
elycruz added a commit that referenced this issue Aug 14, 2022
…now updating all methods that require slices to take an 'XS' that extends and 'Slice<T>' - Allows use of return values as their own types instead of having to cast things to 'Slice<T>' on method use cases.
elycruz added a commit that referenced this issue Feb 16, 2024
…eiving iterables, and removed 'nullish' checks in 'instanceOf' method.
elycruz added a commit that referenced this issue Feb 25, 2024
…contained methods are exported by other members so no need to export the module (as a standalone module/property) at all.
elycruz added a commit that referenced this issue Feb 25, 2024
elycruz added a commit that referenced this issue Feb 26, 2024
elycruz added a commit that referenced this issue Feb 26, 2024
…llow any iterables to be passed in.

Additionally updated some docs.
elycruz added a commit that referenced this issue Feb 26, 2024
elycruz added a commit that referenced this issue Feb 27, 2024
elycruz added a commit that referenced this issue Feb 28, 2024
…precated 'Nameable' and 'TypeRef' related types, and added [pseudo] standalone (tsc) tests for 'Slice' type.
elycruz added a commit that referenced this issue May 27, 2024
- Updated deno.json to include (root)
 "*.mjs", "*.js", "*.ts", and "*.cjs" files in it's "include" list.
- Removed node 'v16' from
  'monorepo-build.yml'.
- Ran 'pnpm up'.
- Updated export paths,
  in 'fjl' package to start with
  './'.
elycruz added a commit that referenced this issue May 27, 2024
- Cleaned up slice-type tests.
- Updated puppeteer version, in deps,
  to 'supported' version.
elycruz added a commit that referenced this issue May 27, 2024
- Moved 'normalizeStep' to it's own module.
- Added 'numRange' (generator) method.
- Updated 'jest.config' to allow test files
  in 'src/' dir.
- Added note in 'string' module.
elycruz added a commit that referenced this issue May 27, 2024
- Fixed lint error, in 'copy' module.
elycruz added a commit that referenced this issue Dec 27, 2024
- Fix empty type in
  'setTheory' module.
elycruz added a commit that referenced this issue Dec 27, 2024
- Cleaned up some comments.
- Cleaned up 'randStr', and 'randStrIter',
  method impls.
- Removed un-required bool check in
  'filter', and 'findWhere', methods.
- Fixed var name typo in 'types/' module.
- Replaced '@todo', in READMEs, to ensure
  Users with that name, do not get
  referenced in the parsed README, on
  github.
- Updated 'drop', and 'take' methods,
  to parse the incoming number to
  an 'absolute' number (ensures only
  positive numbers are used in
  iteration check).
- Removed 'not found' anchor link
  in 'fjl-validators' package README.
elycruz added a commit that referenced this issue Dec 27, 2024
- Cleaned up some comments.
- Cleaned up 'randStr', and 'randStrIter',
  method impls.
- Removed un-required bool check in
  'filter', and 'findWhere', methods.
- Fixed var name typo in 'types/' module.
- Replaced '@todo', in READMEs, to ensure
  Users with that name, do not get
  referenced in the parsed README, on
  github.
- Updated 'drop', and 'take' methods,
  to parse the incoming number to
  an 'absolute' number (ensures only
  positive numbers are used in
  iteration check).
- Removed 'not found' anchor link
  in 'fjl-validators' package README.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant