{"_id":"surrial","_rev":"1065154","name":"surrial","description":"Serialize anything. This is surreal!","dist-tags":{"latest":"2.0.2"},"maintainers":[{"name":"nicojs","email":"jansennico@gmail.com"}],"time":{"modified":"2024-09-27T17:17:55.000Z","created":"2018-02-16T20:22:32.656Z","2.0.2":"2020-03-28T23:55:06.506Z","2.0.1":"2020-02-14T15:26:38.355Z","2.0.0":"2020-02-14T15:21:32.508Z","1.0.0":"2019-02-12T11:01:05.691Z","0.2.0":"2019-01-23T20:20:10.575Z","0.1.3":"2018-02-23T17:38:23.138Z","0.1.2":"2018-02-19T17:53:35.104Z","0.1.1":"2018-02-16T21:27:57.715Z","0.1.0":"2018-02-16T20:22:32.656Z"},"users":{},"author":{"name":"Nico Jansen"},"repository":{"type":"git","url":"git://github.com/nicojs/node-surrial.git"},"versions":{"2.0.2":{"name":"surrial","version":"2.0.2","description":"Serialize anything. This is surreal!","main":"src/index.js","types":"src/index.d.ts","scripts":{"all":"npm run lint && npm run clean && npm run build && npm run test && npm run stryker","clean":"rimraf \"+(src|test)/**/+(*.map|*.js|*.d.ts)\"","lint":"npm run lint:json && npm run lint:ts","lint:json":"prettier --check .eslintrc *.json","lint:ts":"eslint --ext .js,.ts --ignore-path .gitignore .","build":"tsc","start":"tsc -w","test":"nyc --check-coverage --reporter=html --report-dir=reports/coverage --lines 80 --functions 80 --branches 75 mocha --require source-map-support/register \"test/**/*.js\"","stryker":"stryker run","preversion":"npm run all","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","postversion":"git push && git push --tags","release:patch":"npm version patch -m \"chore(release): %s\"","release:minor":"npm version minor -m \"chore(release): %s\"","release:major":"npm version major -m \"chore(release): %s\""},"repository":{"type":"git","url":"git://github.com/nicojs/node-surrial.git"},"bugs":{"url":"https://github.com/nicojs/node-surrial/issues"},"homepage":"https://github.com/nicojs/node-surrial","keywords":["serialize","deserialize","marshal","marshalling","classes"],"author":{"name":"Nico Jansen"},"license":"Apache-2.0","devDependencies":{"@stryker-mutator/core":"^2.5.0","@stryker-mutator/html-reporter":"^2.5.0","@stryker-mutator/mocha-framework":"^2.5.0","@stryker-mutator/mocha-runner":"^2.5.0","@stryker-mutator/typescript":"^2.5.0","@types/chai":"^4.2.9","@types/mocha":"^7.0.1","@types/node":"^13.7.1","@typescript-eslint/eslint-plugin":"^2.19.2","@typescript-eslint/parser":"^2.19.2","chai":"^4.2.0","conventional-changelog-cli":"^2.0.31","eslint":"^6.8.0","eslint-config-prettier":"^6.10.0","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2","mocha":"^7.0.1","nyc":"^15.0.0","prettier":"^1.19.1","rimraf":"^3.0.2","source-map-support":"^0.5.16","typescript":"^3.7.5"},"dependencies":{},"gitHead":"99160906262727b64f4a14626ccc3a7885edd3aa","_id":"surrial@2.0.2","_nodeVersion":"12.16.1","_npmVersion":"6.14.3","dist":{"integrity":"sha512-YQ0XyrdBI8Kx10lIK81zOGXdGtc0P+3FTqEtCdaKzfEJKJWDju2QPp+XhzihmN2KOTRDtkKSyQQXZHYP+SqapA==","shasum":"739afbc9821ebf6aa4e3e9f32abf0021b73ef2b3","tarball":"http://registry-npm.ywwl.com/surrial/download/surrial-2.0.2.tgz","fileCount":12,"unpackedSize":34722,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJef+PaCRA9TVsSAnZWagAA1k0P+wXgSVE7xoTxwMb3GYPs\nHIWKxt4PLnbKSkqOVQ9galzgPPAjVxXtqpjiUc2wBpxyunbbpyIWVSkvtNjA\nNveewQe0JG3iUp+t1WE3AJ0E3F3e98BRACoJ0lPh/33p7LWlJ3eqqimKh/W2\nf+D5NjULShnnBbXZeDSSqyAoZx11u2BBMblETrmgmTJeSQED7yamZ0By+axf\n9Rj6lG6Nkamw+Yp8vkJXmccWTpLQAu3KyDPDuQxaBC02IGn9Ya24lpuNug4a\n+/EZAnuB6bfNx7I8Ts/FEtABfCkszLCybS+g+jgGeGyB5NEMfWyqNxgHpAuz\nkIsdqnqGnqM1QjteDX0J6FoVihbx96oTDeYsUNQ9kImsND/vfdXN8fsNOHix\nudnVF761tWuQ1qVleJ5IOAbdx4cn+PTodtqcXb6IgScVjugiXK3LM0fq/zgg\nAuiOZLxyRLB+iRHeEj8Hf+Fg279RfpinUyY+94sp0h4KM/wwHc1xTVXz6sEW\nkoYAPkvR43syspZv0SVlbzqAVhh/M63r68KEBv7rrPAgQnQ/N1l8me2z8Sqx\nIYCW/OO0SPiDJb7oM8FrYmdPDI5PPzUDEQ9lVNZDtJ/iHYoGcawWgl69vPZH\nxmXfz5idvPJ8535+QM1fcgFrwsMrXOZjXPMET6MUUdIvyNRztRj9BMlyUHTg\nP6yN\r\n=5maL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDy15Td/qLBSK1MjfkcpHF2J2/EWT/cjucAdehBnRFm6wIhALP7EY489sur3fsd72BuUng+UxgCE0b44ZteUXdSjVxs"}],"size":11213,"noattachment":false,"key":"/surrial/-/surrial-2.0.2.tgz"},"maintainers":[{"name":"nicojs","email":"jansennico@gmail.com"}],"_npmUser":{"name":"nicojs","email":"jansennico@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/surrial_2.0.2_1585439706375_0.05196960397034611"},"_hasShrinkwrap":false,"publish_time":1585439706506,"_cnpm_publish_time":1585439706506},"2.0.1":{"name":"surrial","version":"2.0.1","description":"Serialize anything. This is surreal!","main":"src/index.js","types":"src/index.d.ts","scripts":{"all":"npm run lint && npm run clean && npm run build && npm run test && npm run stryker","clean":"rimraf \"+(src|test)/**/+(*.map|*.js|*.d.ts)\"","lint":"npm run lint:json && npm run lint:ts","lint:json":"prettier --check .eslintrc *.json","lint:ts":"eslint --ext .js,.ts --ignore-path .gitignore .","build":"tsc","start":"tsc -w","test":"nyc --check-coverage --reporter=html --report-dir=reports/coverage --lines 80 --functions 80 --branches 75 mocha --require source-map-support/register \"test/**/*.js\"","stryker":"stryker run","preversion":"npm run all","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","postversion":"git push && git push --tags","release:patch":"npm version patch -m \"chore(release): %s\"","release:minor":"npm version minor -m \"chore(release): %s\"","release:major":"npm version major -m \"chore(release): %s\""},"repository":{"type":"git","url":"git://github.com/nicojs/node-surrial.git"},"bugs":{"url":"https://github.com/nicojs/node-surrial/issues"},"homepage":"https://github.com/nicojs/node-surrial","keywords":["serialize","deserialize","marshal","marshalling","classes"],"author":{"name":"Nico Jansen"},"license":"Apache-2.0","devDependencies":{"@stryker-mutator/core":"^2.5.0","@stryker-mutator/html-reporter":"^2.5.0","@stryker-mutator/mocha-framework":"^2.5.0","@stryker-mutator/mocha-runner":"^2.5.0","@stryker-mutator/typescript":"^2.5.0","@types/chai":"^4.2.9","@types/mocha":"^7.0.1","@types/node":"^13.7.1","@typescript-eslint/eslint-plugin":"^2.19.2","@typescript-eslint/parser":"^2.19.2","chai":"^4.2.0","conventional-changelog-cli":"^2.0.31","eslint":"^6.8.0","eslint-config-prettier":"^6.10.0","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2","mocha":"^7.0.1","nyc":"^15.0.0","prettier":"^1.19.1","rimraf":"^3.0.2","source-map-support":"^0.5.16","typescript":"^3.7.5"},"dependencies":{},"gitHead":"06383f590211c854e3ddb90b6d70c5787cb50892","_id":"surrial@2.0.1","_nodeVersion":"12.14.1","_npmVersion":"6.13.7","dist":{"integrity":"sha512-s1LQlqY4am79aFsRLFtpqirqqqIODxdVX8RlphoYktb/9GMbMBqH15UraSoyGt5S5UEvpUzWaY0LcEhrvCh12g==","shasum":"25d74e51601bac90e56becbe7e071d7f953d59a3","tarball":"http://registry-npm.ywwl.com/surrial/download/surrial-2.0.1.tgz","fileCount":12,"unpackedSize":34278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRrwuCRA9TVsSAnZWagAAO74P/AnNES862uXFfIeD0Yuw\nUXNQZdY6grzr44HY1BLOizOjcGRcmfr+NQ5XO9nLnPenPYAacfmOWLFgrsfk\nVG5/U6EVLASmtxdkbxdtV/OI4+7d97lEPvgsoyizuOj5SiQ6ZztKLemf6j1s\nt0Wr3yDxrtPnjpP2p7YF6o4RiHw01j8rUohudfZjP4ptWWKf0NcYXQnKg+ft\ng9l+8WNfWZZs+t+CL7Q/wR1ekUFoI9DO61onyi+6gia5kjba7N4JtkXSfPQF\n6s0feAdL4LpHUS6CJWh/krTHBH6LuTaZyhbbSIe+L48hzEG35PYRqrltSS5C\nSV2xraq4/wTaJpyFg8cbbSJcOHcIf6fa7t7NHllBwdf5wbLZggNSm1WtQRgL\nCOboQlDZaBkacUzuvH2C87KuVpbZSnx9cDVH1ymJmivnx5+spL6B5TDuTZXU\nZN9+kUCozZ8o9mi2xCSWvdh6L/Jldhugf+aPdUexkz0LWMzpo6pUb5O8fU0+\nIwW3x1OgNh9ThHAGJU6kSTue+BZ8CzGYH66Mtq8ojY3tMYsoAqRJpoP5S6Ex\nLxtwU7AzuQ+QBn4jKuL41Pzi/s26yUL+K5D+eI/L9WUqhJl4Xbm36LuwPx7r\ngWhQYG4VjRH0d+0T15NWMmirtxi5dIrwegEgbJm6Uu0ufFSrnhOpCwzJq/TT\neX4W\r\n=bQYm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAh6EBxTr4nTAnnMIk5QxMSoUaXzln2Duf8Rj3eCRAwDAiEAtqeTQ1EEur5M6lv9upKu0IaLTMv1xZXxJgsra6UbX9k="}],"size":11066,"noattachment":false,"key":"/surrial/-/surrial-2.0.1.tgz"},"maintainers":[{"name":"nicojs","email":"jansennico@gmail.com"}],"_npmUser":{"name":"nicojs","email":"jansennico@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/surrial_2.0.1_1581693998239_0.4011544554150026"},"_hasShrinkwrap":false,"publish_time":1581693998355,"_cnpm_publish_time":1581693998355},"2.0.0":{"name":"surrial","version":"2.0.0","description":"Serialize anything. This is surreal!","main":"src/index.js","types":"src/index.d.ts","scripts":{"all":"npm run lint && npm run clean && npm run build && npm run test && npm run stryker","clean":"rimraf \"+(src|test)/**/+(*.map|*.js|*.d.ts)\"","lint":"npm run lint:json && npm run lint:ts","lint:json":"prettier --check .eslintrc *.json","lint:ts":"eslint --ext .js,.ts --ignore-path .gitignore .","build":"tsc","start":"tsc -w","test":"nyc --check-coverage --reporter=html --report-dir=reports/coverage --lines 80 --functions 80 --branches 75 mocha --require source-map-support/register \"test/**/*.js\"","stryker":"stryker run","preversion":"npm run all","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","postversion":"git push && git push --tags","release:patch":"npm version patch -m \"chore(release): %s\"","release:minor":"npm version minor -m \"chore(release): %s\"","release:major":"npm version major -m \"chore(release): %s\""},"repository":{"type":"git","url":"git://github.com/nicojs/node-surrial.git"},"bugs":{"url":"https://github.com/nicojs/node-surrial/issues"},"homepage":"https://github.com/nicojs/node-surrial","keywords":["serialize","deserialize","marshal","marshalling","classes"],"author":{"name":"Nico Jansen"},"license":"Apache-2.0","devDependencies":{"@stryker-mutator/core":"^2.5.0","@stryker-mutator/html-reporter":"^2.5.0","@stryker-mutator/mocha-framework":"^2.5.0","@stryker-mutator/mocha-runner":"^2.5.0","@stryker-mutator/typescript":"^2.5.0","@types/chai":"^4.2.9","@types/mocha":"^7.0.1","@types/node":"^13.7.1","@typescript-eslint/eslint-plugin":"^2.19.2","@typescript-eslint/parser":"^2.19.2","chai":"^4.2.0","conventional-changelog-cli":"^2.0.31","eslint":"^6.8.0","eslint-config-prettier":"^6.10.0","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2","mocha":"^7.0.1","nyc":"^15.0.0","prettier":"^1.19.1","rimraf":"^3.0.2","source-map-support":"^0.5.16","typescript":"^3.7.5"},"dependencies":{},"gitHead":"7a9e9b34543a2a6fab05404b1f2730138edd6f37","_id":"surrial@2.0.0","_nodeVersion":"12.14.1","_npmVersion":"6.13.7","dist":{"integrity":"sha512-6OxKumKRDkzsrXuHSMvsXgmPAugAN6EtFbWsjJBK7wiE5XdVm7XAc84CmiB5jfRxDGRfE0Gn4IWxzjQcBoeK2g==","shasum":"da73394c373be6331eb227c4bd0d2c9da8770df1","tarball":"http://registry-npm.ywwl.com/surrial/download/surrial-2.0.0.tgz","fileCount":12,"unpackedSize":34074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRrr8CRA9TVsSAnZWagAAz2YP/00yllJW2KXkfqR/8Y9+\nUQ+Cw1V2e0zinfudx1W2uT+xdq5lsMBQn4HCsTwFu8UjBJ7BZZvUMfleyB9I\nFeVaat8Wo8JXSmnfoh0ezB+F7/6/2MXbKHKc1cDZI5EIhoaD3eKz34Az7C5u\nHktFQfR9yjnmWz74bth9SholjN8efkkWCAdZABRZbPLc3XGcUDOFg6XeGDOY\ncQWnyMRm9Rcm4D1oNxs/TAMx/Pq/43+SjQqle8R4ZnH6rwnVnw8VYiCnUmo5\n9PC+C/Png1ZrA7KBUheK8AyLaQpUkhafNOFFudQ6UkvuNFvsmMxieWOZX3Sn\nmnhIY6zUWBUaLc+WNhieOs5+uQyFxsW2Dul725MtIOtQ0XyxGNxHkEHXNCH1\n72mvjpK1PnkXtW0FxYuMa+Tewctqcka92uF9EG0C5PZWpHmGo52OYKw6392f\nbIM/RgOnBTGIKa/vjgkUqccK6doSu3rwChdwMKBP1Efvq8HOE4l4lHCDzPaU\n1/U8CSVzxKXs3DXC1egTOcS5tTFNxkcEBoBcLrnmavzkoXxA0UUbZVeXAV5Z\n2g13jeFetHfo1kqgrCnYkk0NL0XQ6MHJ7PJ4q+H5ay7P1CAVHlawrA+0PQJw\nENZ37Ud7sZArI4bbMvWIDzsy61Jc21H0yd4jeeMdTzbbbsuBzjpJj2ozpuZN\n0ydp\r\n=gDcc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDG28qSsBMzI+p85zJ37Qk/fFU+K/mlpZsYanBbBm0ecgIgMzYO+RM+Qu0mCeUOgtlQ8Xlzkj4j79k5ho5VVXYJfR0="}],"size":10994,"noattachment":false,"key":"/surrial/-/surrial-2.0.0.tgz"},"maintainers":[{"name":"nicojs","email":"jansennico@gmail.com"}],"_npmUser":{"name":"nicojs","email":"jansennico@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/surrial_2.0.0_1581693692367_0.45194038150350857"},"_hasShrinkwrap":false,"publish_time":1581693692508,"_cnpm_publish_time":1581693692508},"1.0.0":{"name":"surrial","version":"1.0.0","description":"Serialize anything. This is surreal!","main":"src/index.js","types":"src/index.d.ts","scripts":{"clean":"rimraf \"+(src|test)/**/+(*.map|*.js|*.d.ts)\"","prebuild":"npm run clean","build":"tsc","postbuild":"tslint --project .","pretest":"npm run build","test":"nyc --check-coverage --reporter=html --report-dir=reports/coverage --lines 80 --functions 80 --branches 75 mocha \"test/**/*.js\"","preversion":"npm t","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","postversion":"npm publish && git push && git push --tags","release:patch":"npm version patch -m \"chore(release): %s\"","release:minor":"npm version minor -m \"chore(release): %s\"","release:major":"npm version major -m \"chore(release): %s\""},"repository":{"type":"git","url":"git://github.com/nicojs/node-surrial.git"},"bugs":{"url":"https://github.com/nicojs/node-surrial/issues"},"homepage":"https://github.com/nicojs/node-surrial","keywords":["serialize","deserialize","marshal","marshalling","classes"],"author":{"name":"Nico Jansen"},"license":"Apache2","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^11.9.0","chai":"^4.2.0","conventional-changelog-cli":"^2.0.11","mocha":"^5.2.0","nyc":"^13.2.0","rimraf":"^2.6.3","source-map-support":"^0.5.10","stryker":"^0.35.0","stryker-api":"^0.24.0","stryker-html-reporter":"^0.18.0","stryker-mocha-framework":"^0.15.0","stryker-mocha-runner":"^0.17.0","stryker-typescript":"^0.18.0","tslint":"^5.12.1","typescript":"^3.3.3"},"gitHead":"66e66d983233c461832cc3c8a0671d69c1c24d55","_id":"surrial@1.0.0","_npmVersion":"6.5.0","_nodeVersion":"11.8.0","_npmUser":{"name":"nicojs","email":"jansennico@gmail.com"},"dist":{"integrity":"sha512-dkvhz3QvgraMeFWI9V+BinpNCNoaSNxKcxb0umRpkWeFlZ0WSbIfeTm9YtLA6a4kv/Q2pOMQOtMlcv/b5h6qpg==","shasum":"3ac560cc7038a8ff446920a4f7c3495e1f03a578","tarball":"http://registry-npm.ywwl.com/surrial/download/surrial-1.0.0.tgz","fileCount":10,"unpackedSize":30047,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYqdyCRA9TVsSAnZWagAAHqoP/16fvsGNnAU3XxTXy4QV\nIK8Csc2T7DxVxoDQd/jC3lxEASRhzIGKddJDlr/JgPuqK/6e9HXFtLcDaail\nqJbg12/OtkiyniQOzGNcIyxXW0NtASeDbDkQpZIAfJ0OGn03qCIFJ29AudeA\n+qP8I+ByijEImO4GElFVoY75xTtRtgp2jN9kUzWQuGqs2CB613kJIksoH4fn\n+MYUl00EnJo7obMNcCDWWB09WkNUVxSIoXak3kQLnH9NILceQU5c56jaiYWx\nbm4wNUDUAa2jdI42d7RElM1b/xLSCnuj8EZtzCkTR7/AZ9EL/dprUKz1DVil\nlpNDBrVpHrqDWRzQrM8A4iHttmIeXyaO96IKLBgpH4Oa1NhDoHX0V/nYjWAe\n49nK1b1c4PsAsigOWykwL7X72uO/ZHtCcjT0JfQv/SWfN6mMTyL+W7GNcK0g\nUUCCzHyyopun2NDDyKfxrat1V2zaT+tZB/wlIb8e5dPdiSAUsFNw/9NEMOVE\nNxk/mjqrNp3mGxgZqY/ljJinPpVu6QJhKb5GDSLia8FE88M3tHwWKMVyX/wk\nOE2x+G4VcKk8IwZbOhOvZ40NDibehp0EkBOwCaS6S8gZKll/vCCm4cM+HTdX\nu/fQN+DC+nj/aL7IhFZXWgB7jLKIg4MUmc8aE8537xwC04x6ZnpAfvDjCgJ0\nw2oZ\r\n=ZwF5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDk4aTvcSSPowpA82GDYgRXNbKAKrEIXiDsKhGmop3YCwIgI3lmfghn1r1YiP6GrAS6Fk9ptYRj7YVzy6R31AqqKLY="}],"size":9762,"noattachment":false,"key":"/surrial/-/surrial-1.0.0.tgz"},"maintainers":[{"name":"nicojs","email":"jansennico@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/surrial_1.0.0_1549969265458_0.044645431775169664"},"_hasShrinkwrap":false,"publish_time":1549969265691,"_cnpm_publish_time":1549969265691},"0.2.0":{"name":"surrial","version":"0.2.0","description":"Serialize anything. This is surreal!","main":"src/index.js","types":"src/index.d.ts","scripts":{"clean":"rimraf \"+(src|test)/**/+(*.map|*.js|*.d.ts)\"","prebuild":"npm run clean","build":"tsc","postbuild":"tslint --project .","pretest":"npm run build","test":"nyc --check-coverage --reporter=html --report-dir=reports/coverage --lines 80 --functions 80 --branches 75 mocha \"test/**/*.js\"","preversion":"npm t","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","postversion":"npm publish && git push && git push --tags","release:patch":"npm version patch -m \"chore(release): %s\"","release:minor":"npm version minor -m \"chore(release): %s\"","release:major":"npm version major -m \"chore(release): %s\""},"repository":{"type":"git","url":"git://github.com/nicojs/node-surrial.git"},"bugs":{"url":"https://github.com/nicojs/node-surrial/issues"},"homepage":"https://github.com/nicojs/node-surrial","keywords":["serialize","deserialize","marshal","marshalling","classes"],"author":{"name":"Nico Jansen"},"license":"Apache2","devDependencies":{"@types/chai":"^4.1.4","@types/mocha":"^5.2.5","@types/node":"^10.5.5","chai":"^4.1.2","conventional-changelog-cli":"^2.0.1","mocha":"^5.2.0","nyc":"^12.0.2","rimraf":"^2.6.2","source-map-support":"^0.5.6","stryker":"^0.25.1","stryker-api":"^0.18.0","stryker-html-reporter":"^0.15.0","stryker-mocha-framework":"^0.11.0","stryker-mocha-runner":"^0.13.0","stryker-typescript":"^0.12.0","tslint":"^5.11.0","typescript":"^3.0.1"},"gitHead":"3358a4703ee868f06a4d8a01fea979b14ed61b60","_id":"surrial@0.2.0","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"nicojs","email":"jansennico@gmail.com"},"dist":{"integrity":"sha512-oe4Jrb9Z41gVQ1OZJMmTudYE1R/bBkHVfdZZW3+IWkNiX8uOs52htmGtVqxQgrQxZFhYPYXAZSq+8Ssw66HgVg==","shasum":"3bd4c41c1ebb4bd94b0577c395d4ca234f4f34f7","tarball":"http://registry-npm.ywwl.com/surrial/download/surrial-0.2.0.tgz","fileCount":10,"unpackedSize":29955,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSMx7CRA9TVsSAnZWagAAqF4P/0waEiLuuPJDyOwQ34ju\nnVYGQeunng6VHm+OCN/PwxEc6X1AtzNMrtmfXn6N9sogo03bvHOAf4agGt8t\nhGPCFV2JstWxlDnUAmNJJmRccMWQ1AcIDtTp+AIuGZcpJUDa0Sv+1VyM5jkW\nDEbNz1UsSiRqnAb13xoQ7+QhvjGgeD0stc8U0RPl/yWMYL6EN2ILD3AqUVGU\nfcf7d2DNc6k1Y9EZFBw72ye6M1Th62TOf+BFBRqhuDKxnvZAbPHM5yXS9yHi\nklarjGSXMepFQJN78qx2l/0vd4+XrUU4626IM8F6fI/r5yqoe9rqV5XtGwcu\nal8vGSXW/ciLbtzx8oo+ekIA+zpeee5pfiS3dzftwE5z6OPOubxW0zojOpid\nXASmnRP6iYPHn8AxUAvvFpEmIsM4KpCj6eChpeE98ZwblSTjR1/yxPVOrS8x\nhLHBAqe8nzpoTVx5kkKR5TvvHjTO0SKrjYqCjd7ZZ1E2RXTLKY+I6hFtQbz0\ncLfSqeOlg1AvNB6k3sU9FOMiOdHuei9o0TEsjRIWNdASjYaxUmXFnh6YyFiu\nyq+FsHJ8kmFVkatO23RK5oNHdTEpgTKhMuKlI1SQz8URdfsbUqm9BnJP67iL\nORpbnTxKiL3wem/uYArVrGi5kVmccZMhY4xdTMrP3+w0cd37oVOZkJE4U1Fd\nsc84\r\n=Qnrr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHa22a3pFNtEQoF22I34WjPuIZimJPXLIgQ2CzNvmHXMAiEAo+6wDH0aVG2CDUYWwW/sacZiWDi6y4s1+wyS34smIY4="}],"size":9736,"noattachment":false,"key":"/surrial/-/surrial-0.2.0.tgz"},"maintainers":[{"name":"nicojs","email":"jansennico@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/surrial_0.2.0_1548274810442_0.528652876842495"},"_hasShrinkwrap":false,"publish_time":1548274810575,"_cnpm_publish_time":1548274810575},"0.1.3":{"name":"surrial","version":"0.1.3","description":"Serialize anything. This is surreal!","main":"src/index.js","types":"src/index.d.ts","scripts":{"clean":"rimraf \"+(src|test)/**/+(*.map|*.js|*.d.ts)\"","prebuild":"npm run clean","build":"tsc","postbuild":"tslint --project .","pretest":"npm run build","test":"nyc --check-coverage --reporter=html --report-dir=reports/coverage --lines 80 --functions 80 --branches 75 mocha \"test/**/*.js\"","preversion":"npm t","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","postversion":"npm publish && git push && git push --tags","release:patch":"npm version patch -m \"chore(release): %s\"","release:minor":"npm version minor -m \"chore(release): %s\"","release:major":"npm version major -m \"chore(release): %s\""},"repository":{"type":"git","url":"git://github.com/nicojs/node-surrial.git"},"bugs":{"url":"https://github.com/nicojs/node-surrial/issues"},"homepage":"https://github.com/nicojs/node-surrial","keywords":["serialize","deserialize","marshal","marshalling","classes"],"author":{"name":"Nico Jansen"},"license":"Apache2","devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^2.2.48","@types/node":"^9.4.2","chai":"^4.1.2","conventional-changelog-cli":"^1.3.13","mocha":"^5.0.0","nyc":"^11.4.1","rimraf":"^2.6.2","source-map-support":"^0.5.3","stryker":"^0.19.3","stryker-api":"^0.13.0","stryker-html-reporter":"^0.12.1","stryker-mocha-framework":"^0.8.3","stryker-mocha-runner":"^0.10.5","stryker-typescript":"^0.9.1","tslint":"^5.9.1","typescript":"^2.7.1"},"gitHead":"afadf421cc2816d23930dc97c126d95203987795","_id":"surrial@0.1.3","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"nicojs","email":"jansennico@gmail.com"},"dist":{"integrity":"sha512-Iqfqc9luWn/4r9gHxe3XifYQaVne09TP2hMFQwXSRw4WpfMjNZkZQQjFSzatvrw+MgynEuOZlsB24m0zHNVEBA==","shasum":"35c779e313d0fe0b75e08bced246c1e5d4dbb7db","tarball":"http://registry-npm.ywwl.com/surrial/download/surrial-0.1.3.tgz","fileCount":10,"unpackedSize":27690,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTPTMbgiqhC7Hz0tNPRbfurx1/LgIAXzehRWvdsffHHAIgKyefnm0vKlNlqVbtxwHFSzFLeG6i5mjoYN4B+ihBGMI="}],"size":9216,"noattachment":false,"key":"/surrial/-/surrial-0.1.3.tgz"},"maintainers":[{"name":"nicojs","email":"jansennico@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/surrial_0.1.3_1519407503090_0.43168853838083265"},"_hasShrinkwrap":false,"publish_time":1519407503138,"_cnpm_publish_time":1519407503138},"0.1.2":{"name":"surrial","version":"0.1.2","description":"Serialize anything. This is surreal!","main":"src/index.js","types":"src/index.d.ts","scripts":{"clean":"rimraf \"+(src|test)/**/+(*.map|*.js|*.d.ts)\"","prebuild":"npm run clean","build":"tsc","postbuild":"tslint --project .","pretest":"npm run build","test":"nyc --check-coverage --reporter=html --report-dir=reports/coverage --lines 80 --functions 80 --branches 75 mocha \"test/**/*.js\"","posttest":"stryker run","preversion":"npm t","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","postversion":"npm publish && git push && git push --tags","release:patch":"npm version patch -m \"chore(release): %s\"","release:minor":"npm version minor -m \"chore(release): %s\"","release:major":"npm version major -m \"chore(release): %s\""},"repository":{"type":"git","url":"git://github.com/nicojs/node-surrial.git"},"bugs":{"url":"https://github.com/nicojs/node-surrial/issues"},"homepage":"https://github.com/nicojs/node-surrial","keywords":["serialize","deserialize","marshal","marshalling","classes"],"author":{"name":"Nico Jansen"},"license":"Apache2","devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^2.2.48","@types/node":"^9.4.2","chai":"^4.1.2","conventional-changelog-cli":"^1.3.13","mocha":"^5.0.0","nyc":"^11.4.1","rimraf":"^2.6.2","source-map-support":"^0.5.3","stryker":"^0.19.2","stryker-api":"^0.13.0","stryker-html-reporter":"^0.12.1","stryker-mocha-framework":"^0.8.3","stryker-mocha-runner":"^0.10.5","stryker-typescript":"^0.9.1","tslint":"^5.9.1","typescript":"^2.7.1"},"gitHead":"e5a06c4e7fee1ab63e9b52b10302c4a2dad9a857","_id":"surrial@0.1.2","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"nicojs","email":"jansennico@gmail.com"},"dist":{"integrity":"sha512-LmK8uOBb1g1BNbbsQjJJlnzEgkb7ull1Bmru3sKYq5s0OX+Br4SzezaR+w6exvfqm+UL0f4OxoSaa0faB1H5gA==","shasum":"b22ea2ce27712afd5308b324ef0ba736ef4bf48e","tarball":"http://registry-npm.ywwl.com/surrial/download/surrial-0.1.2.tgz","fileCount":10,"unpackedSize":27284,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrrxjmxUoagBb9P9rVEsdUdf3dYDHq2WAbykq3nW0VFAIgQvsE+tNGmGLseEA4blKM1iZHXGbIgCy+AcjaD347nNE="}],"size":9121,"noattachment":false,"key":"/surrial/-/surrial-0.1.2.tgz"},"maintainers":[{"name":"nicojs","email":"jansennico@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/surrial_0.1.2_1519062815055_0.9959795517138104"},"_hasShrinkwrap":false,"publish_time":1519062815104,"_cnpm_publish_time":1519062815104},"0.1.1":{"name":"surrial","version":"0.1.1","description":"Serialize anything. This is surreal!","main":"src/index.js","types":"src/index.d.ts","scripts":{"clean":"rimraf \"+(src|test)/**/+(*.map|*.js|*.d.ts)\"","prebuild":"npm run clean","build":"tsc","postbuild":"tslint --project .","pretest":"npm run build","test":"nyc --check-coverage --reporter=html --report-dir=reports/coverage --lines 80 --functions 80 --branches 75 mocha \"test/**/*.js\"","posttest":"stryker run","preversion":"npm t","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","postversion":"npm publish && git push && git push --tags","release:patch":"npm version patch -m \"chore(release): %s\"","release:minor":"npm version minor -m \"chore(release): %s\"","release:major":"npm version major -m \"chore(release): %s\""},"keywords":["serialize","deserialize","marshal","marshalling","classes"],"author":{"name":"Nico Jansen"},"license":"Apache2","devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^2.2.48","@types/node":"^9.4.2","chai":"^4.1.2","conventional-changelog-cli":"^1.3.13","mocha":"^5.0.0","nyc":"^11.4.1","rimraf":"^2.6.2","source-map-support":"^0.5.3","stryker":"^0.19.2","stryker-api":"^0.13.0","stryker-html-reporter":"^0.12.1","stryker-mocha-framework":"^0.8.3","stryker-mocha-runner":"^0.10.5","stryker-typescript":"^0.9.1","tslint":"^5.9.1","typescript":"^2.7.1"},"gitHead":"f46219e78ae0448c2ff3c5f547b51b4c0e97dcd6","_id":"surrial@0.1.1","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"nicojs","email":"jansennico@gmail.com"},"dist":{"integrity":"sha512-J+h2J8ZfvvX/Ztx9IGPXUkn6PSN0oFAbD/0j2Lf+q+beG1otfk7IN/2mYjFE+7x+g9ZscSzl5pNXfbv2qFCjbQ==","shasum":"7773e6b98c5246a948a007608c86c202381754df","tarball":"http://registry-npm.ywwl.com/surrial/download/surrial-0.1.1.tgz","fileCount":10,"unpackedSize":26922,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCAdjDYVqYzIkj+dMIgpoRJm6Spv8qRlIehH5aPGboCNAIgXZgsx9xqOX0VLshGAvTEFcFsWv2ZyLDayKjA1IrPCVQ="}],"size":9071,"noattachment":false,"key":"/surrial/-/surrial-0.1.1.tgz"},"maintainers":[{"name":"nicojs","email":"jansennico@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/surrial_0.1.1_1518816477629_0.08361479384530801"},"_hasShrinkwrap":false,"publish_time":1518816477715,"_cnpm_publish_time":1518816477715},"0.1.0":{"name":"surrial","version":"0.1.0","description":"Serialize anything. This is surreal!","main":"src/index.js","types":"src/index.d.ts","scripts":{"clean":"rimraf \"+(src|test)/**/+(*.map|*.js|*.d.ts)\"","prebuild":"npm run clean","build":"tsc","postbuild":"tslint --project .","pretest":"npm run build","test":"nyc --check-coverage --reporter=html --report-dir=reports/coverage --lines 80 --functions 80 --branches 75 mocha \"test/**/*.js\"","posttest":"stryker run","preversion":"npm t","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","postversion":"npm publish && git push && git push --tags","release:patch":"npm version patch -m \"chore(release): %s\"","release:minor":"npm version minor -m \"chore(release): %s\"","release:major":"npm version major -m \"chore(release): %s\""},"keywords":["serialize","deserialize","marshal","marshalling","classes"],"author":{"name":"Nico Jansen"},"license":"Apache2","devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^2.2.48","@types/node":"^9.4.2","chai":"^4.1.2","conventional-changelog-cli":"^1.3.13","mocha":"^5.0.0","nyc":"^11.4.1","rimraf":"^2.6.2","source-map-support":"^0.5.3","stryker":"^0.19.2","stryker-api":"^0.13.0","stryker-html-reporter":"^0.12.1","stryker-mocha-framework":"^0.8.3","stryker-mocha-runner":"^0.10.5","stryker-typescript":"^0.9.1","tslint":"^5.9.1","typescript":"^2.7.1"},"gitHead":"59ab360ca89be679f1ba9545ed44ef74554fb33f","_id":"surrial@0.1.0","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"nicojs","email":"jansennico@gmail.com"},"dist":{"integrity":"sha512-Fw5XZPgvTZraQCwh0Rn03m0cR4iK0RKxFxechk7JZPofGlxvoNdYGbZ/ql7SadgUkaf+MWhnkN+efCmlHu34jA==","shasum":"fa5b6a783058b0fb6d3833a8fed1f24aa23b05ca","tarball":"http://registry-npm.ywwl.com/surrial/download/surrial-0.1.0.tgz","fileCount":10,"unpackedSize":26655,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2m8/NGQs5F/XE7vnFeGqOEsyrSBS56eJKGbVxB533kwIgZVUhVdQTc49w79m5jAvyr3NSqtKrikIISM3Hq+i0pSA="}],"size":8988,"noattachment":false,"key":"/surrial/-/surrial-0.1.0.tgz"},"maintainers":[{"name":"nicojs","email":"jansennico@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/surrial_0.1.0_1518812551968_0.8889299713299843"},"_hasShrinkwrap":false,"publish_time":1518812552656,"_cnpm_publish_time":1518812552656}},"readme":"[![Build Status](https://travis-ci.org/nicojs/node-surrial.svg?branch=master)](https://travis-ci.org/nicojs/node-surrial)\n[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fnicojs%2Fnode-surrial%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/nicojs/node-surrial/master)\n\n# Surrial \n\nSerialize anything. Pretty surreal! \n\n## Install\n\nInstall using your favorite package manager:\n\n```bash\nnpm install surrial\n# OR\nyarn add surrial\n```\n\n## Usage\n\n```javascript\nconst { serialize, deserialize, surrial } = require('surrial');\n\nclass Person {\n    constructor(name, parent){\n        this.name = name;\n        this.parent = parent;\n    }\n}\n\nfunction identity(thing) { return thing;  }\n\nconst stringified = serialize({\n    a: 1,\n    b: new Date(),\n    c: /foo/,\n    d: new Set([1, 2, 3]),\n    e: new Map([[1, 'one'], [2, 'two']]),\n    f: Person,\n    g: identity\n});\n\n/* => '{ \"a\": 1, \"b\": new Date(\"2018-02-13T20:27:39.073Z\"), \"c\": /foo/, \"d\": new Set([1, 2, 3]), \"e\": new Map([[1, \"one\"], [2, \"two\"]]), \"f\": class Person { constructor(name, parent) { this.name = name; this.parent = parent; } }, \"g\": function identity(thing) { return thing;  } }'      \n*/\n\nconst output = deserialize(stringified)\n/* =>\n{ a: 1,\n  b: 2018-02-13T20:32:52.218Z,\n  c: /foo/,\n  d: Set { 1, 2, 3 },\n  e: Map { 1 => 'one', 2 => 'two' },\n  f: [Function: Person],\n  h: [Function: identity] } \n*/\n```\n\nAlso supports serializing instances of classes for known classes.\n\n```javascript\nconst p = new Person('Foo', new Person('Bar', null));\nconst knownClasses = [Person];\nconst personString = serialize(p, knownClasses);\n// => 'new Person(\"Foo\", new Person(\"Bar\", null))'\n\nconst copy = deserialize(p, knownClasses);\n// => Person { name: 'Foo', parent: Person { name: 'Bar', parent: null } }\n```\nAn example of the `surrial` tag for template literals:\n\n```js\nconst decade = [new Date(2010, 1, 1), new Date(2020, 1, 1)];\nsurrial`new Set(${decade})`;\n// => 'new Set([new Date(\"2010-01-31T23:00:00.000Z\"),new Date(\"2020-01-31T23:00:00.000Z\")])'\n```\n\nYou can customize the output string using the `surrialize()` method (comparable to the [`toJSON`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON_behavior) method for `JSON.stringify`). \n\n```ts\n// A typescript example\nclass Person implements Surrializable {\n    public age: number;\n    constructor(ageInMonths: number) {\n        this.age = Math.floor(ageInMonths / 12);\n    }\n    surrialize() {\n        return surrial`new Person(${this.age * 12})`;\n    }\n}\n\nconst input = new Person(25);\nconst actual = serialize(input, [Person]);\nconst output = deserialize(actual, [Person]);\nexpect(output).instanceOf(Person);\nexpect(output).deep.eq(input);\n```\n\n## Api\n\nTypeScript typings are included in the library.\n\n```javascript\n/**\n * A surrial template tag, useful for building templates strings while enforcing the values to be serialized using surrial.\n * @param templateLiterals The template literals\n * @param values The values to be serialized using surrial\n */\nexport function surrial(templateLiterals: TemplateStringsArray, ...values: unknown[]) {\n\n/**\n * Serializes the thing to a javascript string. This is NOT necessarily a JSON string, but will be valid javascript.\n * @param thing The thing to be serialized\n * @param knownClasses the classes of which instances are serialized as constructor calls (for example \"new Person('Henry')\").\n */\nexport function serialize(thing: any, knownClasses: ClassConstructor[] = []): string {\n\n\n/**\n * Deserializes a string into it's javascript equivalent. CAUTION! Evaluates the string in the current javascript engine\n * (`eval` or one of its friends). Be sure the `serializedThing` comes from a trusted source!\n * @param serializedThing The string to deserialize\n * @param knownClasses A list of known classes used to provide as constructor functions\n */\nexport function deserialize(serializedThing: string, knownClasses: ClassConstructor[] = []): any;\n```\n\n\n## Features\n\n* Serializes all primitive types\n* Serializes plain objects as JSON\n* Support for build in types: `Date`, `RegExp`, `Map`, `Set` and `Buffer`\n* Support for functions and classes using their `toString()` \n* Support for instances of classes using `new MyClass()` syntax (see [limitations](#class-instances)).\n* Support for deeply nested build in types/class instances\n* Has a light footprint (&lt; 200 lines of code).\n* Written in typescript (type definition included).\n* Deserialize using a `deserialize` convenience method. This uses the `new Function(/*...*/)` (comparable to `eval`) (see [limitations](#deserializing-is-no-security-feature-you-will-get-hacked)).\n* Serialize values in a template with a handy `surrial` tagged template literal.\n* Allow a custom serialize function using `surrialize`.\n\n## Limitations\n\nSurrial, like any serialization library, has some limitations, but supports my personal use case. \nIf you need more functionality, don't hesitate to open [an issue](https://github.com/nicojs/node-surrial/issues). \nI'm always in for a discussion.\n\n### Circular references\n\nCircular references are not supported.\n\n### Deserializing is no security feature (you will get hacked!)\n\nWhen you call the `deserialize` method, any string will be interpreted as javascript using the [`new Function(...)` constructor](https://developer.mozilla.org/nl/docs/Web/JavaScript/Reference/Global_Objects/Function). Keep in mind that any arbitrary code will be executed in the global scope of your current javascript engine! Please **don't use this library** to deserialize strings coming from untrusted sources!\n\n### Class instances\n\nClass instances are serialized using their constructor. Any additional properties are ignored.\n\n```javascript\nclass Person {\n    constructor(name){\n        this.name = name;\n    }\n}\n\nconst p = new Person('foo');\np.age = 10; // => ignored\nserialize(p, [Person]);\n// => 'new Person(\"foo\")'\n```\n\nBoth the `class` syntax and `prototype` syntax (es5 syntax) are supported here. \n\nWhen serializing an instance of a class, it is assumed that the constructor parameters are also properties (or attributes) of that class. If not, that parameter will be undefined.\n\n```javascript\nclass Person {\n    constructor(n, age){\n        this.name = n; // => ignored\n        this.age = age;\n    }\n}\n\nconst p = new Person('foo', 42);\nserialize(p);\n// => 'new Person(undefined, 42)'\n```\n\nWhen serializing a class instance, only classes you specify as `knownClasses` are actually serialized using `new MyClass()`, \nby default it would just have a JSON format.\n\n```javascript\nclass Person { constructor(name) { this.name = name; }}\nserialize(new Person('Foo'));\n// => { \"name\": \"foo\" }\n\nserialize(new Person('Foo'), [Person]);\n// => new Person(\"foo\")\n```\n\nWhen deserializing a class instance, you are responsible for providing a class definition (or a class with the same name).\n\n```javascript\nclass Person { constructor(name) { this.name = name; }}\ndeserialize('new Person(\"Foo\")');\n// => ReferenceError: Person is not defined\n\ndeserialize('new Person(\"Foo\")', [Person]);\n// => OK: Person { name: 'Foo' }\n```\n\n\n## Acknowledgements\n\n* This library is strongly influenced by [serialize-javascript](https://www.npmjs.com/package/serialize-javascript).\nThis might be what you're looking for when you don't need the class instance serialization support.\n* A library which supports circular references: [circular-json](https://www.npmjs.com/package/circular-json)\n* Know the class that you're serializing to? [serialize.ts](https://www.npmjs.com/package/serializer.ts) might be for you. This one also looks good: [cerialize](https://www.npmjs.com/package/cerialize)\n\n","_attachments":{},"homepage":"https://github.com/nicojs/node-surrial","bugs":{"url":"https://github.com/nicojs/node-surrial/issues"},"license":"Apache-2.0"}