{"_id":"shq","_rev":"511707","name":"shq","description":"Quote a string for safe use as a shell argument. Strips null characters.","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"mk-pmb","email":"mk+npmjs@pimpmybyte.de"}],"time":{"modified":"2021-08-09T14:01:01.000Z","created":"2020-06-27T16:32:38.778Z","1.0.2":"2020-06-27T20:16:39.871Z","1.0.1":"2020-06-27T17:45:40.792Z","1.0.0":"2020-06-27T16:32:38.778Z"},"users":{},"author":{"name":"M.K.","url":"https://github.com/mk-pmb"},"repository":{"type":"git","url":"git+https://github.com/mk-pmb/shq-js.git"},"versions":{"1.0.2":{"name":"shq","version":"1.0.2","description":"Quote a string for safe use as a shell argument. Strips null characters.","keywords":["bash","escape","sh","shell","quote"],"author":{"name":"M.K.","url":"https://github.com/mk-pmb"},"homepage":"https://github.com/mk-pmb/shq-js/#readme","repository":{"type":"git","url":"git+https://github.com/mk-pmb/shq-js.git"},"bugs":{"url":"https://github.com/mk-pmb/shq-js/issues"},"contributors":[],"private":false,"license":"ISC","main":"shq.mjs","scripts":{"test":"nodemjs test.usage.mjs"},"directories":{"test":"test"},"dependencies":{},"browser":{},"devDependencies":{"nodemjs":"^0.1.8"},"npm vs. BOM = Unexpected token":"-*- coding: UTF-8 -*-","gitHead":"95be3bac3dc0950ef5c066320f0dacb9c5219dcd","_id":"shq@1.0.2","_nodeVersion":"8.17.0","_npmVersion":"6.14.5","_npmUser":{"name":"mk-pmb","email":"mk+npmjs@pimpmybyte.de"},"dist":{"shasum":"bc3f9ac369100cdd754d45032d987b3b62d32fd0","size":1796,"noattachment":false,"key":"/shq/-/shq-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/shq/download/shq-1.0.2.tgz"},"maintainers":[{"name":"mk-pmb","email":"mk+npmjs@pimpmybyte.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shq_1.0.2_1593288999760_0.5778834312349856"},"_hasShrinkwrap":false,"publish_time":1593288999871,"_cnpm_publish_time":1593288999871},"1.0.1":{"name":"shq","version":"1.0.1","description":"Quote a string for safe use as a shell argument. Strips null characters.","keywords":["bash","escape","sh","shell","quote"],"author":{"name":"M.K.","url":"https://github.com/mk-pmb"},"homepage":"https://github.com/mk-pmb/shq-js/#readme","repository":{"type":"git","url":"git+https://github.com/mk-pmb/shq-js.git"},"bugs":{"url":"https://github.com/mk-pmb/shq-js/issues"},"contributors":[],"private":false,"license":"ISC","main":"shq.mjs","scripts":{"test":"nodemjs test.usage.mjs"},"directories":{"test":"test"},"dependencies":{},"browser":{},"devDependencies":{"nodemjs":"^0.1.8"},"npm vs. BOM = Unexpected token":"-*- coding: UTF-8 -*-","gitHead":"4646d1521fa00cb996ff2f4d9c194952d291614b","_id":"shq@1.0.1","_nodeVersion":"8.17.0","_npmVersion":"6.14.5","_npmUser":{"name":"mk-pmb","email":"mk+npmjs@pimpmybyte.de"},"dist":{"shasum":"683c02ddb4f89dfaca566d31c8e63c46d16f0a43","size":1797,"noattachment":false,"key":"/shq/-/shq-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/shq/download/shq-1.0.1.tgz"},"maintainers":[{"name":"mk-pmb","email":"mk+npmjs@pimpmybyte.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shq_1.0.1_1593279940666_0.5373672225991992"},"_hasShrinkwrap":false,"publish_time":1593279940792,"_cnpm_publish_time":1593279940792},"1.0.0":{"name":"shq","version":"1.0.0","description":"Quote a string for safe use as a shell argument. Strips null characters.","keywords":["bash","escape","sh","shell","quote"],"author":{"name":"M.K.","url":"https://github.com/mk-pmb"},"homepage":"https://github.com/mk-pmb/shq-js/#readme","repository":{"type":"git","url":"git+https://github.com/mk-pmb/shq-js.git"},"bugs":{"url":"https://github.com/mk-pmb/shq-js/issues"},"contributors":[],"private":false,"license":"ISC","main":"shq.mjs","scripts":{"test":"nodemjs test.usage.mjs"},"directories":{"test":"test"},"dependencies":{},"browser":{},"devDependencies":{"nodemjs":"^0.1.8"},"npm vs. BOM = Unexpected token":"-*- coding: UTF-8 -*-","gitHead":"b34e347a4fb315ab49dd7fc062caa446de2aa37a","_id":"shq@1.0.0","_nodeVersion":"8.17.0","_npmVersion":"6.14.5","_npmUser":{"name":"mk-pmb","email":"mk+npmjs@pimpmybyte.de"},"dist":{"shasum":"e3dcaac358b329153d6dafa695c11bcee8ba5e87","size":1422,"noattachment":false,"key":"/shq/-/shq-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/shq/download/shq-1.0.0.tgz"},"maintainers":[{"name":"mk-pmb","email":"mk+npmjs@pimpmybyte.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shq_1.0.0_1593275558655_0.23605577784023035"},"_hasShrinkwrap":false,"publish_time":1593275558778,"_cnpm_publish_time":1593275558778}},"readme":"﻿\n<!--#echo json=\"package.json\" key=\"name\" underline=\"=\" -->\nshq\n===\n<!--/#echo -->\n\n<!--#echo json=\"package.json\" key=\"description\" -->\nQuote a string for safe use as a shell argument. Strips null characters.\n<!--/#echo -->\n\n\nAPI\n---\n\nThis module ESM-exports one function that holds some methods:\n\n### shq(x)\n\n* Stringify `x`,\n* remove all U+0000 null characters, because all too often, some C program\n  in the pipeline will screw it up even if properly quoted,\n* and in case it contains special characters, quote it.\n\n\n\n### shq.cfg(opt)\n\nReturn a customized quoting function.\n`opt` is an optional options object that supports these keys:\n\n* `empty`: How to represent the empty string. Default: A pair of single quotes.\n* `gratuitous`: What string to put on both sides of a non-empty input that\n  doesn't need to be quoted.\n\n\n\n### shq.always\n\nA quoting function that adds `gratuitous` single quotes (cf. `.cfg`).\n\n\n\n\n\n\n\nUsage\n-----\n\nsee [test.usage.mjs](test.usage.mjs).\n\n\n<!--#toc stop=\"scan\" -->\n\n\n\nKnown issues\n------------\n\n* Needs more/better tests and docs.\n\n\n\n\n&nbsp;\n\n\nLicense\n-------\n<!--#echo json=\"package.json\" key=\".license\" -->\nISC\n<!--/#echo -->\n","_attachments":{},"homepage":"https://github.com/mk-pmb/shq-js/#readme","bugs":{"url":"https://github.com/mk-pmb/shq-js/issues"},"license":"ISC"}