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

Quality of life improvements #124

Merged
merged 67 commits into from
Oct 20, 2021
Merged
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
5c461df
initial
alexreardon Aug 31, 2021
be62c91
typing goodness
alexreardon Aug 31, 2021
90120e0
trying weakmaps
alexreardon Aug 31, 2021
90a96b3
using map for now
alexreardon Aug 31, 2021
d0e81d7
making name writing because why not
alexreardon Aug 31, 2021
0012074
adding minor tests
alexreardon Aug 31, 2021
df7a8d5
minor reformatting
alexreardon Aug 31, 2021
4a50848
better naming for anonymous fns
alexreardon Aug 31, 2021
37c2f14
using a variable rather than a map for now to hold cache
alexreardon Aug 31, 2021
a14f72b
removing redundant property
alexreardon Sep 1, 2021
c925f41
more types
alexreardon Sep 1, 2021
a24ae2f
continue to improve types
alexreardon Sep 1, 2021
ef02130
adding type improvements and tests
alexreardon Sep 1, 2021
240c487
minor type move
alexreardon Sep 1, 2021
4544976
comment update
alexreardon Sep 1, 2021
d9f4df0
test for type of clear function
alexreardon Sep 1, 2021
f9feb89
adding test for cache clearing
alexreardon Sep 2, 2021
9c79669
shifting over to main, removing fn naming
alexreardon Sep 26, 2021
9f3d201
fixing test links
alexreardon Sep 26, 2021
60d9251
renaming test file, adding comments
alexreardon Sep 26, 2021
2846fd6
updating a test name
alexreardon Sep 26, 2021
df61a4d
bumping deps
alexreardon Sep 26, 2021
4f95b68
bumping deps, fixing 3rd party types
alexreardon Sep 26, 2021
43dd445
baselining library comparison
alexreardon Sep 26, 2021
c4452d3
adding lodash.memoize
alexreardon Sep 26, 2021
6be9f57
perf runner working
alexreardon Sep 26, 2021
df68217
disabling ts
alexreardon Sep 26, 2021
e82c14a
wip
alexreardon Sep 26, 2021
b615c77
leaning into ts
alexreardon Sep 27, 2021
7adb481
removing old files
alexreardon Sep 27, 2021
a9a8f1e
nice output
alexreardon Sep 27, 2021
1792ea7
adding my libraries
alexreardon Sep 27, 2021
3ee2ee9
heavier slow fn
alexreardon Sep 27, 2021
07c60e2
removing travis
alexreardon Sep 27, 2021
9b2cb7d
adding github workflows
alexreardon Sep 27, 2021
2a2edcf
fixing eslint
alexreardon Sep 28, 2021
16844f2
fixing commands
alexreardon Sep 28, 2021
21be245
updating comment
alexreardon Sep 28, 2021
7d74046
removing unused dependabot ignore
alexreardon Sep 28, 2021
82cf3af
type test for equalityfn
alexreardon Oct 1, 2021
a26cb54
removing whitespace
alexreardon Oct 1, 2021
35231c9
tweaking the readme
alexreardon Oct 3, 2021
ae6d858
adding performance results
alexreardon Oct 6, 2021
806a028
adding more to readme
alexreardon Oct 11, 2021
752bc49
adding section about function properties to readme
alexreardon Oct 11, 2021
664007e
adding notes
alexreardon Oct 11, 2021
dfcf27b
minor disclaimer
alexreardon Oct 11, 2021
e2f12d3
wip tests
alexreardon Oct 11, 2021
02911d8
fleshing out test
alexreardon Oct 11, 2021
f239f05
adding equality types to readme
alexreardon Oct 11, 2021
2f98c12
adding docs about .clear()
alexreardon Oct 11, 2021
73f6d9b
removing comment
alexreardon Oct 15, 2021
2a2c84b
v6.0.0-beta.1
alexreardon Oct 15, 2021
84f2b21
sneaky flowtypes
alexreardon Oct 15, 2021
8b12bfb
exporting MemoizedFn type
alexreardon Oct 18, 2021
ae7a643
adding MemoizeFn generic
alexreardon Oct 18, 2021
dd27948
minor tweaks
alexreardon Oct 18, 2021
19b26b4
improving language in docs
alexreardon Oct 19, 2021
4872312
bumping node version (again)
alexreardon Oct 19, 2021
3e75de0
moving to node 16
alexreardon Oct 19, 2021
ce0c6bf
outputting results to markdown tables
alexreardon Oct 19, 2021
4c5409b
formatting results
alexreardon Oct 19, 2021
18b689f
updating results
alexreardon Oct 19, 2021
cd46d47
removing temp type:module
alexreardon Oct 19, 2021
994ef04
updating perf benchmark as lodash only uses the first argument as the…
alexreardon Oct 19, 2021
d8246db
updating copy in readme
alexreardon Oct 20, 2021
e5a4d8b
adding tests for casting the type of a memoized function
alexreardon Oct 20, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
minor tweaks
  • Loading branch information
alexreardon committed Oct 18, 2021
commit dd279481289cb183cb8221e080d2e4178c8f0293
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ You are welcome to use the `MemoizedFn` generic directly from `memoize-one` if y
```ts
import memoize, { MemoizedFn } from 'memoize-one';
import isDeepEqual from 'lodash.isequal';
import { expectTypeOf } from 'expect-type';

// Takes any function: TFunc, and returns a Memoized<TFunc>
function withDeepEqual<TFunc extends (...args: any[]) => any>(fn: TFunc): MemoizedFn<TFunc> {
Expand All @@ -508,6 +509,7 @@ In this specific example, this type would have been correctly inferred too
```ts
import memoize, { MemoizedFn } from 'memoize-one';
import isDeepEqual from 'lodash.isequal';
import { expectTypeOf } from 'expect-type';

// return type of MemoizedFn<TFunc> is inferred
function withDeepEqual<TFunc extends (...args: any[]) => any>(fn: TFunc) {
Expand Down