{"_id":"@codetheorist/mc-nbt","_rev":"4-e28742cd144ed7e26bd69743057413a6","name":"@codetheorist/mc-nbt","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.3":{"name":"@codetheorist/mc-nbt","version":"0.1.3","private":false,"description":"A parser specifically for Minecraft files, with built-in ZLib de-compression.","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"format":"prettier --write \"src/**/*.ts\"","build":"tsc","lint":"tslint -p tsconfig.json","postversion":"git push && git push --tags","prepare":"npm run build","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","test":"jest --config jestconfig.json","version":"npm run format && git add -A src"},"devDependencies":{"@types/jest":"^25.2.3","jest":"^26.0.1","prettier":"^2.0.5","ts-jest":"^26.0.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","typescript":"^3.9.3"},"repository":{"type":"git","url":"git+ssh://git@github.com/BedRocker/mc-nbt.git"},"keywords":["minecraft","nbt","parser"],"author":{"name":"Alex Scott","email":"alex@codetheoristdevelopments.co.uk"},"license":"ISC","bugs":{"url":"https://github.com/BedRocker/mc-nbt/issues"},"homepage":"https://github.com/BedRocker/mc-nbt#readme","dependencies":{"protodef":"^1.7.1"},"gitHead":"da19391d94ad5f2e21128d3f92ffc7ff1031fd8a","_id":"@codetheorist/mc-nbt@0.1.3","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-0MpwO8YQW3UB5wJtNrSeIA/5ddA3xQMv1ozm39nDtTDHo4sHt6F7K83qyFlY2BzGqonPFOScQFPhZx0cLMBfIg==","shasum":"53a0ae3cf06ad8a73b180536d075f2e5d713ac69","tarball":"https://registry.npmjs.org/@codetheorist/mc-nbt/-/mc-nbt-0.1.3.tgz","fileCount":15,"unpackedSize":37629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezY8KCRA9TVsSAnZWagAAo28P/iL3tWG3ibLeFX3kTrzb\npPAx/r0AgTKldaT6bQGs+DzbfIj4WjKngFORF+VaRGSgDYAyHrB5pzjIbJJK\nMvITLuOz6aQ+xdqvsBuMtsugkwZBaw4dxAbQrjBKLJbM8Qou6kaCbBlN8IiX\nvEQZWKfh9CIC7vjqyyGiMxiylZ1dHVQCvadDLiGiDlxj0CrLEzV90f+0YaYb\nIco2umIaF6dW8Pj4kVtc3H1TekPg/0jnBuQau6MScuqTThyNQ6hucaAM+j6v\nmfvyaVmHJAUDGT1t+Rx5U4MoqWmemG0eFrVNbusKTBsNua7f4dcvqwz7lWN8\nDRh7+JeY/ngZwW2n4dxmHpA4PfP8GEmlg6B+DesQxbmLuPFTcRcISW0Kgekc\nWd2hDl46ssH/ZecK811kclAvwrtirlpNK4FOmOv3A0lKK4ysunPCm0JxURXP\nM1U+Q4fzTDo8I0xgSkIcTsRjE4iocU9xdqVZ3KxzcnQuC2FGffpQRHVFQRVl\nZqumH/CiYDYI2JuWiVSzOaiWZYORYQezVejiXlP67NIBagDjv3wsygrwgSWE\nEYY5A/jj4Euaf8dpjKu4wbRKw2nTPI3iMIvmznFWtajqaTXXG5isfZWpjUom\nD7XNJbKxmF8n8VVxThD+0W2gfwtFrqeBBZb+rXN8ZgibL63ksvATABcf6e9j\nBxX5\r\n=HyGo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGbSzQBviyEy/lpPYfpt/W3ItUMtFGzUj/vwUkIOPQOmAiEAsRigoiktN1mDkTjo63r0vBeAQx3jmOvk9DBTr0EHfm4="}]},"maintainers":[{"name":"codetheoristdevelopments","email":"codetheorist@gmail.com"}],"_npmUser":{"name":"codetheoristdevelopments","email":"codetheorist@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mc-nbt_0.1.3_1590529801428_0.4687734276012301"},"_hasShrinkwrap":false,"deprecated":"This package has moved to a new scope. If you're using this package, please update your dependency to the new location @bedrocker/mc-nbt."},"0.1.4":{"name":"@codetheorist/mc-nbt","version":"0.1.4","private":false,"description":"A parser specifically for Minecraft files, with built-in ZLib de-compression.","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"format":"prettier --write \"src/**/*.ts\"","build":"tsc","lint":"tslint -p tsconfig.json","postversion":"git push && git push --tags","prepare":"npm run build","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","test":"jest --config jestconfig.json","version":"npm run format && git add -A src"},"devDependencies":{"@types/jest":"^25.2.3","jest":"^26.0.1","prettier":"^2.0.5","ts-jest":"^26.0.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","typescript":"^3.9.3"},"repository":{"type":"git","url":"git+ssh://git@github.com/BedRocker/mc-nbt.git"},"keywords":["minecraft","nbt","parser"],"author":{"name":"Alex Scott","email":"alex@codetheoristdevelopments.co.uk"},"license":"ISC","bugs":{"url":"https://github.com/BedRocker/mc-nbt/issues"},"homepage":"https://github.com/BedRocker/mc-nbt#readme","dependencies":{"protodef":"^1.7.1"},"gitHead":"77316fcb975d2ca3ff9dd7bb7a9eb13ea48ee4f2","_id":"@codetheorist/mc-nbt@0.1.4","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-/Ar3sQv9kC1YlqrN0TIMidM+uUyVAX6HnOnJaPM3WXgmDhROFlfmMoItKwzNrTYGF/QN9yZksxtLeeZ9/4xi5w==","shasum":"672290783a685f6c729170c1c82c606e5dd2f91f","tarball":"https://registry.npmjs.org/@codetheorist/mc-nbt/-/mc-nbt-0.1.4.tgz","fileCount":15,"unpackedSize":39606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezZQkCRA9TVsSAnZWagAAWMIP/2faW7UyuCmzbcekAM4r\nQElRo+cAJGRHlK8LYjXc3Rq1gNi0yLyD0SAsYuoPuI4zDz/wYSJdj93q7fJK\noq0XDfNMI3XgS6Fu4sOS9Lv0kHxTkOZTEmJnSW3QSmZXYMFQF1o2lZJ+SzyS\n72l7eWFhPt9qiSj+rJhU/l6eb2hID1Gi11RmeJ6NBHxUEyXb73SlmaVazux7\nltOiRpm4vBgUK0zzhu8Ez0LAq4xQqspXJCJiwaQ1WtZZL2AyT/huw9AH7492\nnOOVaIuUM6RbeAZ4/rPSXteluqidpXBTFNB+CL2cDkZrD+AKMMf6SnZaaaM0\nAWoG9rqYtfqfWoOGs17ZuevKf7MTpPpQFA6PN3VcEbqN/p/wkOqD4QqHH2Pw\nc+0qUMVYX/v+/oCsiXb/0ZZ3S9o44fBqVrKCwNYu722Z3VCPcfeuI5wZ9WbW\nQoz9tfU7EXdG9clekI8itbDScY/HZht++3K2U6iFo3OuB96QBDEOeE3SHY8w\nwARlTMwbtL40Wyt7Gudg4ehMd89fdATKQrZZG6cxmewBUDzU175kI6l5xVMb\nsDhkpm7MQRxwCLmcYYG4jVDazSURK0lsZHH4Np4xRb8YBFRseqigTDFGWCA2\nfrRnKnDi8b5Diu1aMvTlN3Gch5NCr3+PRlRfmQV90/95NWcFOFY5kLKgtEmW\nl6ZJ\r\n=6AdL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGpVPTMZ0cPnT4M+2KCaM+ZXjIRG2r0cDZClfnuqQanvAiB/s4STrptPaj9WNKrLJXbSlcGT8kTOm1uK7MPqFAU0cA=="}]},"maintainers":[{"name":"codetheoristdevelopments","email":"codetheorist@gmail.com"}],"_npmUser":{"name":"codetheoristdevelopments","email":"codetheorist@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mc-nbt_0.1.4_1590531107906_0.5803245765890612"},"_hasShrinkwrap":false,"deprecated":"This package has moved to a new scope. If you're using this package, please update your dependency to the new location @bedrocker/mc-nbt."}},"time":{"created":"2020-05-26T21:50:01.166Z","0.1.3":"2020-05-26T21:50:01.826Z","modified":"2022-04-05T00:07:02.745Z","0.1.4":"2020-05-26T22:11:48.025Z"},"maintainers":[{"name":"codetheoristdevelopments","email":"codetheorist@gmail.com"}],"description":"A parser specifically for Minecraft files, with built-in ZLib de-compression.","homepage":"https://github.com/BedRocker/mc-nbt#readme","keywords":["minecraft","nbt","parser"],"repository":{"type":"git","url":"git+ssh://git@github.com/BedRocker/mc-nbt.git"},"author":{"name":"Alex Scott","email":"alex@codetheoristdevelopments.co.uk"},"bugs":{"url":"https://github.com/BedRocker/mc-nbt/issues"},"license":"ISC","readme":"# Minecraft NBT Parser\r\n## Built with TypeScript\r\n[![NPM version](https://img.shields.io/npm/v/@codetheorist/mc-nbt)](http://npmjs.com/package/prismarine-nbt)\r\n[![Build Status](https://img.shields.io/circleci/project/BedRocker/mc-nbt/master)](https://circleci.com/gh/BedRocker/mc-nbt)\r\n\r\nMC-NBT is a TypeScript parser and serializer for [NBT](http://wiki.vg/NBT) archives, for use with [Node.js](http://nodejs.org/).\r\n\r\n### Installation\r\nTo install into your project, simply run `npm install --save @codetheorist/mc-nbt` in the root of your project.\r\n\r\n### Usage\r\nTo read NBT headers from a file, the following code snippet should get you going:\r\n\r\n```\r\nconst NBT = require('@codetheorist/mc-nbt')\r\nconst fs = require('fs')\r\n\r\nfs.readFile('data.nbt', (error, data) => {\r\n  if (error) throw error;\r\n\r\n  nbt.parse(data, (error, data) => {\r\n    console.log(data.value.stringTest.value);\r\n    console.log(data.value['nested compound test'].value);\r\n  });\r\n});\r\n```\r\nIf the file is ZLib compressed, then it will automatically be decompressed first\r\n\r\n### API\r\n\r\n#### writeUncompressed(value,[isLittleEndian])\r\nReturns a buffer with a serialized nbt value. If isLittleEndian is passed and is true, write little endian nbt (mcpe).\r\n\r\n#### parseUncompressed(data,[isLittleEndian])\r\nTakes a buffer data and returns a parsed nbt value. If isLittleEndian is passed and is true, read little endian nbt (mcpe).\r\n\r\n#### parse(data,[isLittleEndian], callback)\r\nTakes an optionally compressed data and provide a parsed nbt value in the callback(err,value). If isLittleEndian is passed and is true, read little endian nbt (mcpe).\r\n\r\n#### simplify(nbt)\r\nReturns a simplified nbt representation : keep only the value to remove one level. This loses the types so you cannot use the resulting representation to write it back to nbt.\r\n\r\n#### proto\r\nProvide the protodef instance used to parse and serialize nbt.\r\n\r\n#### protoLE\r\nProvide the protodef instance used to parse and serialize little endian nbt.\r\n","readmeFilename":"README.md"}