mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 17:01:20 -08:00
build(site): [SITE-07] preserve exact Stack Overflow revision and attribution
This commit is contained in:
1 parent
3136eb2402
commit
0503fe8aa8
30 files changed
+1941
-27
No files matched your search
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"items": [
|
||||
{
|
||||
"revision_guid": "8FD5F52A-B16F-4C66-AB48-830EABB36CC0",
|
||||
"post_id": 48254637,
|
||||
"revision_number": 5,
|
||||
"creation_date": 1537324801,
|
||||
"user": {
|
||||
"user_id": 1223975
|
||||
},
|
||||
"content_license": "CC BY-SA 4.0",
|
||||
"body": "<p>@RobW's answer is correct, but this is more performant ! Because it uses a hashmap/set:</p>\n<pre><code>const customStringify = function (v) {\n const cache = new Set();\n return JSON.stringify(v, function (key, value) {\n if (typeof value === 'object' && value !== null) {\n if (cache.has(value)) {\n // Circular reference found, discard key\n return;\n }\n // Store value in our set\n cache.add(value);\n }\n return value;\n });\n};\n</code></pre>\n"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user