{"_id":"netstring","_rev":"17-6a514479eaa940d7ab6d452846b298e2","name":"netstring","description":"A netstring implementation","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"netstring","version":"0.1.0","description":"A netstring implementation","author":{"name":"Peter Griess","email":"pg@std.in"},"engines":{"node":">=0.1.98"},"repositories":[{"type":"git","url":"http://github.com/pgriess/node-netstring"}],"licenses":[{"type":"BSD","url":"http://github.com/pgriess/node-netstring/blob/master/LICENSE"}],"main":"./lib/ns","_id":"netstring@0.1.0","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/netstring/-/netstring-0.1.0.tgz","shasum":"3d719a2abc2223c7d2f0a98aa02421e34ac37b7d","integrity":"sha512-+4eALgiWj4NBHoy1PgzTTEYZsOkEWDxkfb9gx1xKRFYHK0sFmqJ3CEgjpT1k9+dY6AYx5ktWNCxGA5oJ+Kf/Gg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvGJq/vQAY7FDfdo8o8as9H2gPHYunfdrA+nV5jLNezAIhAIFHscaUfxMGMce83nzDT+N2Sz8NMS7t58+8sy2q6OYi"}]}},"0.2.0":{"name":"netstring","version":"0.2.0","description":"A netstring implementation","author":{"name":"Peter Griess","email":"pg@std.in"},"engines":{"node":">=0.2"},"repositories":[{"type":"git","url":"http://github.com/josh/node-netstring"}],"licenses":[{"type":"BSD","url":"http://github.com/josh/node-netstring/blob/master/LICENSE"}],"main":"./lib/ns.js","scripts":{"test":"node test/test.js"},"dependencies":{},"devDependencies":{},"_id":"netstring@0.2.0","_engineSupported":true,"_npmVersion":"1.0.6","_nodeVersion":"v0.4.7","_defaultsLoaded":true,"dist":{"shasum":"e519e164a8866afbf5940c46e9b8259fb20f2287","tarball":"https://registry.npmjs.org/netstring/-/netstring-0.2.0.tgz","integrity":"sha512-3tJkmR5vdBs0jKaD5oI0aFe9bo6UNqBkf4JJBCBYrrc6Neq+Q33JKYqdd8aQFxIXAKdalMjzwDQLqmGj+NtKJg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNRGKJLiyMqjZ3SPwhhuwr8PTWNZecsYcaGI44p6gvYQIgIFMmoYD4O+C3jra4x+8Mil9EvtBVwRfBowRpEuTYQWM="}]}},"0.3.0":{"name":"netstring","version":"0.3.0","description":"A netstring implementation","author":{"name":"Peter Griess","email":"pg@std.in"},"engines":{"node":">=0.6"},"repositories":[{"type":"git","url":"http://github.com/josh/node-netstring"}],"licenses":[{"type":"BSD","url":"http://github.com/josh/node-netstring/blob/master/LICENSE"}],"main":"./ns.js","devDependencies":{"nodeunit":"0.7.4"},"scripts":{"test":"nodeunit ./test.js"},"_id":"netstring@0.3.0","dist":{"shasum":"868dc5b20c58d3f7305531d49368eaaabd19b712","tarball":"https://registry.npmjs.org/netstring/-/netstring-0.3.0.tgz","integrity":"sha512-zTXpGlbh5IDsH2+cf1esHnzZn6F3N55bmfdKq0kCGaIYb68RCIsD2MGk8L7yi0Nyh1Us/Mn22eHb5VKhAM6iQw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBWojQ7yxEA31lkwf/DXWhpLDBkNdqbTYKyToHotPAhYAiEAwED+Bcqy/KvbOmJbJ3nMbrrPsfwjKDkAozj1WknCJO8="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"josh","email":"josh@joshpeek.com"},"maintainers":[{"name":"pgriess","email":"pg@std.in"},{"name":"josh","email":"josh@joshpeek.com"},{"name":"dtrejo","email":"david.daniel.trejo@gmail.com"}]}},"maintainers":[{"name":"pgriess","email":"pg@std.in"},{"name":"dtrejo","email":"david.daniel.trejo@gmail.com"}],"author":{"name":"Peter Griess","email":"pg@std.in"},"time":{"modified":"2022-06-21T01:10:24.917Z","created":"2011-05-08T21:47:01.038Z","0.1.0":"2011-05-08T21:47:01.038Z","0.2.0":"2011-05-08T23:14:47.613Z","0.3.0":"2013-03-18T19:42:12.279Z"},"readme":"A braindead module for reading and writing\n[netstrings](http://cr.yp.to/proto/netstrings.txt).\n\n## API\n    nsWriteLength(len)\n\nCompute the number of bytes to required serialize a netstring with the `len`\nbytes.\n\n    nsWrite(pay, payStart = 0, payEnd = pay.length, buf = undefined, bufOff = 0)\n\nWrite the payload `pay ` out in netstring format, returning a string. The\n`payStart` and `payEnd` parameters allow specifying a range for the payload\nand default to the entire object. Like `Buffer.slice()`, this `payStart` is\ninclusive and `payEnd` is exclusive. The `pay` parameter can be either a\nstring or a `Buffer` object.\n\nIf the `buf` parameter is specified, the netstring is written to this buffer\nrather than returned as a string. The `bufOff` parameter allows specifying\nthe offset into the buffer at which to begin writing. The length of the\nresulting netstring in bytes is returned.\n\n    nsPayload(buf, off = 0)\n\nGet the payload of the netstring pointed to by the given `buf` object at\noffset `off`. Despite its name, `buf`, can be either a string or a `Buffer`.\nThe returned value will be of the same type as the `buf` parameter or a\nnegative integer value in following the error taxonomy of\n`nsPayloadLength()`.\n\n    nsPayloadLength(buf, off = 0)\n\nGet the length of the payload pointed to by the given `buf` object at offset\n`off`. Despite its name, `buf`, can be either a string or a `Buffer`. The\nlength returned is only that of the payload; it does not include the header\nor footer. The returned value will be -1 if the buffer does not include\nenough data to make a complete length calculation.\n\n    nsLength(buf, off = 0)\n\nGet the length of the netstring pointed to by the given `buf` object at\noffset `off`. Despite its name, `buf`, can be either a string or a `Buffer`.\nThe length returned includes the length of the header and footer in addition\nto the payload. Negative values follow the taxonomy from `nsPayloadLength()`.\n","readmeFilename":"README.md"}