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

clear能否加个fn, 类似于filter #12

Open
guohuihot opened this issue Jul 23, 2018 · 2 comments
Open

clear能否加个fn, 类似于filter #12

guohuihot opened this issue Jul 23, 2018 · 2 comments

Comments

@guohuihot
Copy link

clear((key) => {
   return key == 'aaa'
})

返回true,清除,返回false 忽略

@wuchangming
Copy link
Owner

wsCache.delete('aaa');

@guohuihot
Copy link
Author

guohuihot commented Jul 25, 2018

wsCache.delete(/^manager_/);

这样可以吗?我只是举了个例子,实际应用中有多种需求,如果是个fn就可以按自己的需求去处理相关的问题,不用这么写死

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

2 participants