{"_id":"@nuxtjs/devalue","_rev":"66-325d368fc0f436b827199a2d5cb50847","name":"@nuxtjs/devalue","dist-tags":{"latest":"1.2.3"},"versions":{"1.0.0":{"name":"@nuxtjs/devalue","version":"1.0.0","license":"LIL","_id":"@nuxtjs/devalue@1.0.0","maintainers":[{"name":"aldarund","email":"aldarund@gmail.com"}],"homepage":"https://github.com/nuxt-community/devalue#readme","bugs":{"url":"https://github.com/nuxt-community/devalue/issues"},"dist":{"shasum":"97c5cfbac0cd3eb7a7894a4e1bfe5c22eeee3ab3","tarball":"https://registry.npmjs.org/@nuxtjs/devalue/-/devalue-1.0.0.tgz","fileCount":7,"integrity":"sha512-2hL39RGEMaa3cGthmVPfS4+smKNVfy+v0gpRtgmW8esBtRhJoRMQQh6oiyCpdOoPnAMbJJjsKc9xgwXF7gb6Qw==","signatures":[{"sig":"MEQCIGd2nX/fzbjuBaQEyZrpiQZi+Yzi08W/hznqXYteRtUjAiAkFdN3DEgm0wp7A9q8UD8iWCuAbgXe6FXzcBAu5LLMHg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21802,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbtgwpCRA9TVsSAnZWagAAaKIQAJSqm3mRGuLhYTjw4B7A\nw2EQUpAUpsrct7MWk7z8fpqixBHgb5iHaUMu0gF0dkGI87eLtyaz2BT1U6fX\na1fkZfG7/1OMfQX3BLh3j4R8gmrw+IZZR6yO6xmeaEfyrgkcL8e+3mNWTwls\n7n/oRkwIH6G0yqZ+p7SDCJ+EnUeQZS84SwoaCO7aHGSGhCdprm/Nt+gxHHXf\nBLXTpUaZf2PtcOnEgb1XJ7CvPs+QyqqzQ2x7b4ihyE6eSnm7Lchr+ZCNznR3\nn0dw7j8ga+APdHE6Ky6Zn25HF+/lNxb+GfnU9vjxbwRxThpxEI1lgBSqHvIw\nzYodsogPqU8M9GqMAsXCgUnwycCiFo944QmE1UwOW2SIuuAubEGNyRITQWVE\nbO6WXVSIuf9y3kfUvjhVtpJ75sdfYmjHxz++5W9QXIoCLTozhRG7JqdX+Ncl\n0X+cokBQVrbvkGycq562VUG8VPcp2qUNag5Pf/GPGKW5T47qrRF7DQ6H/4wk\nqeaMy+JRKuK9h2Wa3ShoVUhtqxmNtmij+mvnuplVkz/cUKEtQoF2JO2NZk9X\ngbCsmMW490gmlAGvCX7I6imvBj6l9fH2cZYYE2fXRH/l6T5JUagEaXnja/kD\nQdtBpldS66cpocWdf+NhUKDNTDer1JWSfURb9TtJiKBBeYRVdCsFw2pzYX9+\nNhJ9\r\n=1A0D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/devalue.umd.js","types":"types/index.d.ts","module":"dist/devalue.esm.js","gitHead":"c3943a4ff2847b677eeae1655d3cafe1111e701a","scripts":{"test":"mocha --opts mocha.opts","build":"npm run build-declarations && rollup -c","prepublishOnly":"npm run build && npm test","build-declarations":"tsc -d && node scripts/move-type-declarations.js"},"_npmUser":{"name":"aldarund","email":"aldarund@gmail.com"},"repository":{"url":"git+https://github.com/nuxt-community/devalue.git","type":"git"},"_npmVersion":"6.4.1","description":"Gets the job done when JSON.stringify can't","directories":{},"_nodeVersion":"10.11.0","dependencies":{"consola":"^1.4.3"},"_hasShrinkwrap":false,"devDependencies":{"glob":"^7.1.2","mocha":"^4.0.1","rollup":"^0.52.0","sander":"^0.6.0","ts-node":"^3.3.0","typescript":"^2.6.2","@types/node":"^8.0.53","@types/mocha":"^2.2.44","rollup-plugin-virtual":"^1.0.1","rollup-plugin-typescript":"^0.8.1"},"_npmOperationalInternal":{"tmp":"tmp/devalue_1.0.0_1538657320493_0.0880281166029262","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@nuxtjs/devalue","version":"1.0.1","license":"LIL","_id":"@nuxtjs/devalue@1.0.1","maintainers":[{"name":"aldarund","email":"aldarund@gmail.com"}],"homepage":"https://github.com/nuxt-community/devalue#readme","bugs":{"url":"https://github.com/nuxt-community/devalue/issues"},"dist":{"shasum":"661f16ed4c5d4bf64ab8b6e66fa1aa16bc57d504","tarball":"https://registry.npmjs.org/@nuxtjs/devalue/-/devalue-1.0.1.tgz","fileCount":7,"integrity":"sha512-kL4x8JyK8fvOKWhFENDzwTH+AR4HUYOCVEGkoe0XUyniqsesIXcZiPCV+sGXBwTwwopQDVpaz97y+RyBH535gw==","signatures":[{"sig":"MEQCIGQYt8pHDy+iV8Ja+xEDLe2vEyA9mcirfN6avhZDJLawAiBUDTIpPbmWEH4vbnep9WtGm0Zk9EWQN8ak7KK2Yu68xA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxOW7CRA9TVsSAnZWagAAuDMP/Rr5FBu7MgQHvHyqLhFR\nw7SkiV+QMUz4nwi74hFSSuMWzlC5pYLiVX3+nMup1Zaj3pqNoo8uFsnqaptB\n5u4S2aO38oiaTFiNFld5oX/ylT2j5E9Qlhk3AUmryaCfHK4h4FIjFKNM8HgU\n5w1lNqmEJ3tYbcWBcrBAWTzXaYo9UdYY/Xcaf0O6lESH277xcknclp8OT/0o\niE2pXyBApI3HRjxtidZvbKP2Hbncoy4TbsOtcpqI3huHx+3QwKGb9JlstVNf\nBjMY+Wendvfp6ODzUitUfhtpY4GUchG4gud1avvSlzU//wfW4NcimgSLTpGW\n6D/rdb9uQROlfYv4gccm3iIePZZdSsfYfVRS7QP3euh3U/xrQ+mBolt9POPD\nU2iQhuyEaEriHt/CAet1w2Lz2XAJLEf3PwZnKc9z2K78zXpf8olxIf1Y4iq1\nH3bxdzgaT/huPzNYBc6LiN9JyplOEZCeInWHXLODDwTP1VqOal/v4WINQvmU\nRXNhlzcX2mcIhtC1RlpbJ3+gsNevLpabJhCuuAMeTy7k/dAd8Qjj6oltcDeY\n51PWSGeEKYUAkIYbEgyHj2wFhd8co0hmNLpGKIo/rPYxUjiUvUPzOxZea24/\nRzzBSvg5HQzHuCxS5eU/rvLj7jaPrYTB/ks9PpGNXziSbmkWk5paFAOKYupw\nemms\r\n=Ou/r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/devalue.umd.js","types":"types/index.d.ts","module":"dist/devalue.esm.js","gitHead":"bfb9d9a112bc20af51568a44ca0e3c632ce17e1c","scripts":{"test":"mocha --opts mocha.opts","build":"npm run build-declarations && rollup -c","prepublishOnly":"npm run build && npm test","build-declarations":"tsc -d && node scripts/move-type-declarations.js"},"_npmUser":{"name":"aldarund","email":"aldarund@gmail.com"},"repository":{"url":"git+https://github.com/nuxt-community/devalue.git","type":"git"},"_npmVersion":"6.4.1","description":"Gets the job done when JSON.stringify can't","directories":{},"_nodeVersion":"10.11.0","dependencies":{"consola":"^1.4.3"},"_hasShrinkwrap":false,"devDependencies":{"glob":"^7.1.3","mocha":"^5.2.0","tslib":"^1.9.3","rollup":"^0.66.6","sander":"^0.6.0","ts-node":"^7.0.1","typescript":"^3.1.3","@types/node":"^10.11.7","@types/mocha":"^5.2.5","rollup-plugin-virtual":"^1.0.1","rollup-plugin-typescript":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/devalue_1.0.1_1539630522544_0.1974297217097929","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@nuxtjs/devalue","version":"1.1.0","license":"LIL","_id":"@nuxtjs/devalue@1.1.0","maintainers":[{"name":"aldarund","email":"aldarund@gmail.com"},{"name":"alexchopin","email":"alex@chopin.io"},{"name":"atinux","email":"atinux@gmail.com"},{"name":"clarkdo","email":"clark.duxin@gmail.com"},{"name":"pi0","email":"pyapar@gmail.com"}],"homepage":"https://github.com/nuxt-community/devalue#readme","bugs":{"url":"https://github.com/nuxt-community/devalue/issues"},"dist":{"shasum":"4dcdf33d914f6ea71b09da365452dd1016390d64","tarball":"https://registry.npmjs.org/@nuxtjs/devalue/-/devalue-1.1.0.tgz","fileCount":7,"integrity":"sha512-q0c6OY+NgIs0whENpQtGOdnxy95e357aBtX8ix4koMtqijjUuWO+SjFE/s3Apg7F+YfBWMuDJ0wj9ZWktzDnhg==","signatures":[{"sig":"MEUCIQCExFojL1XG9SeyZTw9jW57t/6XfHReEYTGHt88yulKbQIgBjb9zi/I5r+AaCBgztAzbJUQAhRG5HX1imGkVTv3KdQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22525,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb3OQRCRA9TVsSAnZWagAAia0QAIX0uXmrjWyFy0FB87xS\n/2wnJ4y/PihFw9WZR7ZRCZP5APPya9idv8mNNU3XOQ02YZ1fNkH2Ub1X7zeP\nNE6M/guHgTFuHNfUoDHk4nevoDeCa9We1XMlCTKxA1zxio5RWYb6lsQLPg23\nXOioT9FVQBHRqQoRa5GDWYGg2NG3RmVU9KHo+si8BNEyiKAM7V5tzcjiNjxl\nxxL0ITSTsW5OTo1Bw4xvMuJaeGzjAlimWvXqt55sZxr+ns7Pn4yPGY0MHakc\nGPrh/aLH2MJOtpCYvOtmaFJWlsgm8kIrPApju6r898lZlAK2BYLiwQhqtBfQ\n96CqcgKHRSj9hvUy0Kes8ka0e5Ai9tqsg+pz2X7O7N1imJQuEFj6PHSF6+9v\noeZXHgP0Nvdist7nte9rROc0G63O6j7jE9D8BfOywqMKTMb/cP7Sb/oATGx0\n8pZAPKS17bk/8YNtgmZGr3+KBvLDi37ZBKNmdPji78x3Wp6KeynFHMiI1d/B\n8CCt8tEoa0mAenN8ef3NIMjLWIp0HiKPctICObgQ08QXrqZ79T8S6zDZg4Fo\nM4wNBNtBXnFxSklRlSoAqvA9IEi5p8vBN570CJ1veNKWcjdp0ZBUXmVC5wsH\nu+wPWDkgiQPf57i+nK7ojimxiNTr2/0j3DqUFsg4EGg1ddoPUw+cwS5pZ0rV\nyNGS\r\n=m1pB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/devalue.umd.js","types":"types/index.d.ts","module":"dist/devalue.esm.js","gitHead":"fcc458584f2e9539c043125215c98b7ed94d466e","scripts":{"test":"mocha --opts mocha.opts","build":"npm run build-declarations && rollup -c","prepublishOnly":"npm run build && npm test","build-declarations":"tsc -d && node scripts/move-type-declarations.js"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"repository":{"url":"git+https://github.com/nuxt-community/devalue.git","type":"git"},"_npmVersion":"6.4.1","description":"Gets the job done when JSON.stringify can't","directories":{},"_nodeVersion":"8.11.3","dependencies":{"consola":"^2.0.7"},"_hasShrinkwrap":false,"devDependencies":{"glob":"^7.1.3","mocha":"^5.2.0","tslib":"^1.9.3","rollup":"^0.66.6","sander":"^0.6.0","ts-node":"^7.0.1","typescript":"^3.1.3","@types/node":"^10.11.7","@types/mocha":"^5.2.5","rollup-plugin-virtual":"^1.0.1","rollup-plugin-typescript":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/devalue_1.1.0_1541202960284_0.8609857532150373","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@nuxtjs/devalue","version":"1.2.0","license":"LIL","_id":"@nuxtjs/devalue@1.2.0","maintainers":[{"name":"aldarund","email":"aldarund@gmail.com"},{"name":"alexchopin","email":"alex@chopin.io"},{"name":"atinux","email":"atinux@gmail.com"},{"name":"clarkdo","email":"clark.duxin@gmail.com"},{"name":"nuxt.bot","email":"nuxt.bot@gmail.com"},{"name":"pi0","email":"pyapar@gmail.com"}],"homepage":"https://github.com/nuxt-community/devalue#readme","bugs":{"url":"https://github.com/nuxt-community/devalue/issues"},"dist":{"shasum":"f3f40c4678916a7159b9e43e9cef57db0390538f","tarball":"https://registry.npmjs.org/@nuxtjs/devalue/-/devalue-1.2.0.tgz","fileCount":8,"integrity":"sha512-k5PwF2YD4BPqvNyDGUMZKx2nqMiqyz+9NqBKuhWYl+D5sElct/19Cos8X2qcxFze1u7nW7OZ+oYmkgibP9TK8g==","signatures":[{"sig":"MEUCIGIKL9M1ZfAJyEfjAT5DORyrMxdPPFYdqvxXph5FeN4fAiEAtxj3q9Nia6e+7YItsTi3VPGO7GYAH6o/pVG6T6Pxcs4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34680,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcG3NiCRA9TVsSAnZWagAACTwP/A9ACxbgb9Eg2qCnk9x/\nUAcxm60Jmb92t2Pq+LTZG7yVs+URoWpXyfM/SsaW/Saznv8usIET+piMtFWD\nrzgjGvDc6RPEJx0W2TUnDNCp3NufrsZaaXDxTS0npDz30zJWzCFpVAFQLvTn\nl5ph7sdVRmecKNbNiGp7qwv/sY+JLPnQEEPYA5XCMOAILc1p6IFsTmKXN1d6\n9mKTTc+hw33gTap/WDfgv1WS60jjxiFw2CTTKTBGJ+CeIwrWHPqJtDYx5bvJ\nsDLACiwWpg4TY9q9VA0HK8npq/C1HLuuDFY6vnUlr1eGym2EA7E9COWJ6GVo\nETPq/a22KX3Qe7WyZJMhXKF0DsP25eQvMFfAeGEEO3or8nNCGej+bAtAZLwG\njJvrIihqDjAC25adKgxvJZrNYe7xTey5ydxO572dbyhlJPB0nfB/4VUOVc6i\n6jPz5Yg4PKxCAw19n8fjbiZZp3iv1NduMur0H9JAj+9eZ2suKXfhzG6IdJ7c\nWoJoHxBN77Tc0VXgM5Dl7h2dojxx/xkl+xS4yn/Ybxt1A1TbpjJEy8h2MZP0\nsIH2Eh8Uv0A5eG9EoaWFt3bIq47l98GW5Ke8/gKaskIjlANfnsh+ZxOMCYwR\n7bZ3JLbdsF34hHIm/yW5Kv+h4011AoU4E+ADpeo/wrTb+qwsVZmTYuqP91+l\ngF7X\r\n=IMPe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/devalue.cjs.js","types":"types/index.d.ts","module":"dist/devalue.esm.js","browser":"dist/devalue.js","gitHead":"919f83a51a6f06f43a0a94d87f4c5f3ee76c0eb5","scripts":{"test":"mocha --opts mocha.opts","build":"npm run build-declarations && rollup -c","prepublishOnly":"npm run build && npm test","build-declarations":"tsc -d && node scripts/move-type-declarations.js"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"repository":{"url":"git+https://github.com/nuxt-community/devalue.git","type":"git"},"_npmVersion":"6.4.1","description":"Gets the job done when JSON.stringify can't","directories":{},"_nodeVersion":"11.4.0","dependencies":{"consola":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"glob":"^7.1.3","mocha":"^5.2.0","tslib":"^1.9.3","rollup":"^0.68.0","sander":"^0.6.0","ts-node":"^7.0.1","typescript":"^3.2.2","@types/node":"^10.12.15","@types/mocha":"^5.2.5","rollup-plugin-virtual":"^1.0.1","rollup-plugin-typescript":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/devalue_1.2.0_1545302881715_0.5522128479170951","host":"s3://npm-registry-packages"}},"1.2.3":{"name":"@nuxtjs/devalue","version":"1.2.3","license":"LIL","_id":"@nuxtjs/devalue@1.2.3","maintainers":[{"name":"aldarund","email":"aldarund@gmail.com"},{"name":"alexchopin","email":"alex@chopin.io"},{"name":"atinux","email":"atinux@gmail.com"},{"name":"clarkdo","email":"clark.duxin@gmail.com"},{"name":"nuxt.bot","email":"nuxt.bot@gmail.com"},{"name":"pi0","email":"pyapar@gmail.com"}],"homepage":"https://github.com/nuxt-community/devalue#readme","bugs":{"url":"https://github.com/nuxt-community/devalue/issues"},"dist":{"shasum":"99916fecf893c71efe88593c3aa3518e551e5723","tarball":"https://registry.npmjs.org/@nuxtjs/devalue/-/devalue-1.2.3.tgz","fileCount":8,"integrity":"sha512-wLz0Sv6DXjTHEHuG404vbqwjnzC8G7ZpSCfAdYt45G89F+tpZLeh/+1StRIrg8IlQ605GzOPOXdERrm4tdOF5A==","signatures":[{"sig":"MEQCIEi68tbFgUMiAzanlVvl1vJpIwdOAlCcFeq1aAv0o3F/AiBNaGoHXlEIW3XdbqwQndBo7x/jHQ769U3Xy4xSdDlPqw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcs5veCRA9TVsSAnZWagAAoukP/3E4zxl476zWJsKZRQIo\naJA36Els/DDiuuRKi8GGvBYo4aJu/OFNSosL4thxoOiHRz62rAY2MWQgNKEM\nYpMw2TRT5QKPnRbWl4dgOWlWb4XeX9pYt3+KMfwZxgqp9DlOXcHWj9cnP86C\nPHKoo3ZfSPDr3Wv0LZc3/zQ0FX2K+L9Sp5+ikIdG3VEubaokJD0Q9rLAjQ8F\ndOo/l7eoMjvnmqiZiIxhqSXpdl0cC471rwy/urvT0902hY2YytkAB6AmajKG\nXYNA4FRE/tjpVBRvKfy1VP0CW4P4oriSrJi4ND4M7mWoNzDwxaBG5lYusmbx\n2tVQPb3779oA3y3R9CO/9x3bo1tmzSFwKy8iszBnD3yKpN+6VFGLcyoXceVP\nhOAyVsnm3UG2mlmykJsSxazUcRzrDnbcTTr3NdI7Fq1DKd3anbmBLnSnL3Bc\nJqS+8Z4j80gxEtT6WGprK5wqh59rD0GglbbpFs7ppdgSZwgaMlkrHaUOTcLH\nd6ghedYgDbcy2p5MbXNTZeQ8JtF5xvORvwFouk6E7gBJikmj17I0oomtctRC\nA8LudxtnntZgI1lRaGkyVl+5vxG370ednLqNB7pP12g1XD5IJD1pteYRSdrK\nnjiQ03iu7WBl2c08ep42lYG/Z9kca2k3MFoUJ22RohumaDLpxEo57604hwNe\naUiZ\r\n=3a62\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/devalue.cjs.js","types":"types/index.d.ts","module":"dist/devalue.esm.js","browser":"dist/devalue.js","gitHead":"6b06aaf0184ff35bf45f87e6de9900563f4f8133","scripts":{"test":"mocha --opts mocha.opts","build":"npm run build-declarations && rollup -c","prepublishOnly":"npm run build && npm test","build-declarations":"tsc -d && node scripts/move-type-declarations.js"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"repository":{"url":"git+https://github.com/nuxt-community/devalue.git","type":"git"},"_npmVersion":"6.9.0","description":"Gets the job done when JSON.stringify can't","directories":{},"_nodeVersion":"11.13.0","dependencies":{"consola":"^2.5.6"},"_hasShrinkwrap":false,"devDependencies":{"glob":"^7.1.3","mocha":"^6.0.2","tslib":"^1.9.3","rollup":"^1.3.2","sander":"^0.6.0","ts-node":"^8.0.2","typescript":"^3.3.3333","@types/node":"^11.9.5","@types/mocha":"^5.2.6","rollup-plugin-virtual":"^1.0.1","rollup-plugin-typescript":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/devalue_1.2.3_1555274717794_0.5401496293960102","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-10-04T12:48:29.404Z","modified":"2026-10-13T10:41:15.608Z","1.0.0":"2018-10-04T12:48:40.677Z","1.0.1":"2018-10-15T19:08:42.640Z","1.1.0":"2018-11-02T23:56:00.505Z","1.2.0":"2018-12-20T10:48:01.809Z","1.2.3":"2019-04-14T20:45:17.925Z"},"bugs":{"url":"https://github.com/nuxt-community/devalue/issues"},"license":"LIL","homepage":"https://github.com/nuxt-community/devalue#readme","repository":{"url":"git+https://github.com/nuxt-community/devalue.git","type":"git"},"description":"Gets the job done when JSON.stringify can't","maintainers":[],"readme":"# @nuxt/devalue\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![Circle CI][circleci-src]][circleci-href]\n[![package phobia][package-phobia-src]][package-phobia-href]\n[![bundle phobia][bundle-phobia-src]][bundle-phobia-href]\n\n> Forked from [devalue](https://github.com/Rich-Harris/devalue) to log errors on non-serializable properties rather than throwing `Error`.\n\nLike `JSON.stringify`, but handles\n\n* cyclical references (`obj.self = obj`)\n* repeated references (`[value, value]`)\n* `undefined`, `Infinity`, `NaN`, `-0`\n* regular expressions\n* dates\n* `Map` and `Set`\n* `.toJSON()` method for non-POJOs\n\nTry it out on [runkit.com](https://npm.runkit.com/@nuxt/devalue).\n\n## Goals:\n\n* Performance\n* Security (see [XSS mitigation](#xss-mitigation))\n* Compact output\n\n\n## Non-goals:\n\n* Human-readable output\n* Stringifying functions or arbritary non-POJOs\n\n\n## Usage\n\n```js\nimport devalue from '@nuxt/devalue';\n\nlet obj = { a: 1, b: 2 };\nobj.c = 3;\n\ndevalue(obj); // '{a:1,b:2,c:3}'\n\nobj.self = obj;\ndevalue(obj); // '(function(a){a.a=1;a.b=2;a.c=3;a.self=a;return a}({}))'\n```\n\nIf `devalue` encounters a function or a non-POJO, it will throw an error.\n\n\n## XSS mitigation\n\nSay you're server-rendering a page and want to serialize some state, which could include user input. `JSON.stringify` doesn't protect against XSS attacks:\n\n```js\nconst state = {\n  userinput: `</script><script src='https://evil.com/mwahaha.js'>`\n};\n\nconst template = `\n<script>\n  // NEVER DO THIS\n  var preloaded = ${JSON.stringify(state)};\n</script>`;\n```\n\nWhich would result in this:\n\n```html\n<script>\n  // NEVER DO THIS\n  var preloaded = {\"userinput\":\"</script><script src='https://evil.com/mwahaha.js'>\"};\n</script>\n```\n\nUsing `devalue`, we're protected against that attack:\n\n```js\nconst template = `\n<script>\n  var preloaded = ${devalue(state)};\n</script>`;\n```\n\n```html\n<script>\n  var preloaded = {userinput:\"\\\\u003C\\\\u002Fscript\\\\u003E\\\\u003Cscript src=\\'https:\\\\u002F\\\\u002Fevil.com\\\\u002Fmwahaha.js\\'\\\\u003E\"};\n</script>\n```\n\nThis, along with the fact that `devalue` bails on functions and non-POJOs, stops attackers from executing arbitrary code. Strings generated by `devalue` can be safely deserialized with `eval` or `new Function`:\n\n```js\nconst value = (0,eval)('(' + str + ')');\n```\n\n\n## Other security considerations\n\nWhile `devalue` prevents the XSS vulnerability shown above, meaning you can use it to send data from server to client, **you should not send user data from client to server** using the same method. Since it has to be evaluated, an attacker that successfully submitted data that bypassed `devalue` would have access to your system.\n\nWhen using `eval`, ensure that you call it *indirectly* so that the evaluated code doesn't have access to the surrounding scope:\n\n```js\n{\n  const sensitiveData = 'Setec Astronomy';\n  eval('sendToEvilServer(sensitiveData)'); // pwned :(\n  (0,eval)('sendToEvilServer(sensitiveData)'); // nice try, evildoer!\n}\n```\n\nUsing `new Function(code)` is akin to using indirect eval.\n\n\n## See also\n\n* [lave](https://github.com/jed/lave) by Jed Schmidt\n* [arson](https://github.com/benjamn/arson) by Ben Newman\n* [tosource](https://github.com/marcello3d/node-tosource) by Marcello Bastéa-Forte\n* [serialize-javascript](https://github.com/yahoo/serialize-javascript) by Eric Ferraiuolo\n\n\n## License\n\n[LIL](LICENSE)\n\n<!-- Refs -->\n[npm-version-src]: https://flat.badgen.net/npm/v/@nuxt/devalue/latest\n[npm-version-href]: https://www.npmjs.com/package/@nuxt/devalue\n\n[npm-downloads-src]: https://flat.badgen.net/npm/dm/@nuxt/devalue\n[npm-downloads-href]: https://www.npmjs.com/package/@nuxt/devalue\n\n[circleci-src]: https://flat.badgen.net/circleci/github/nuxt/devalue\n[circleci-href]: https://circleci.com/gh/nuxt/devalue\n\n[package-phobia-src]: https://flat.badgen.net/packagephobia/install/@nuxt/devalue\n[package-phobia-href]: https://packagephobia.now.sh/result?p=@nuxt/devalue\n\n[bundle-phobia-src]: https://flat.badgen.net/bundlephobia/minzip/@nuxt/devalue\n[bundle-phobia-href]: https://bundlephobia.com/result?p=@nuxt/devalue\n","readmeFilename":"README.md"}