We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
键值对去重,正则会被JSON.stringify转成{},导致/a/和/b/没有区别,去重之后只会保留一个正则
The text was updated successfully, but these errors were encountered:
@MR-YUZL 非常感谢你的指正,这里确实存在问题,相关的文章已引用更正
Sorry, something went wrong.
function unique(array) { var obj = {}; return array.filter(function (item, index, array) { console.log(typeof item + item + JSON.stringify(item)) return obj.hasOwnProperty(typeof item + item + JSON.stringify(item)) ? false : (obj[typeof item + item + JSON.stringify(item)] = true) }) } 改成这样可以解决你说的正则不能去重的问题吗
No branches or pull requests
键值对去重,正则会被JSON.stringify转成{},导致/a/和/b/没有区别,去重之后只会保留一个正则
The text was updated successfully, but these errors were encountered: