{"name":"shq","version":"1.0.3","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.js","scripts":{"test":"elp && nodemjs test/all.mjs"},"directories":{"test":"test"},"eslintConfig":{"extends":"nodejs-pmb"},"dependencies":{},"devDependencies":{"eslint-config-nodejs-pmb":"^0.3.5","eslint-plugin-json-light-pmb":"^1.0.7","eslint-plugin-n":"^15.2.4","eslint-pretty-pmb":"^1.0.5","nodemjs":"^0.1.14","p-fatal":"^0.1.5","usnam-pmb":"^0.2.5"},"npm vs. BOM = Unexpected token":"-*- coding: UTF-8 -*-","gitHead":"67d55bf10b6de4710691d25e124676857bdfb0dc","_id":"shq@1.0.3","_nodeVersion":"8.17.0","_npmVersion":"6.14.17","_npmUser":{"name":"mk-pmb","email":"mk+npmjs@pimpmybyte.de"},"dist":{"integrity":"sha512-1XtfCjwPTIA7E/5gvoRbgVyHpeHcLGcleGrTZIaiqGKDelycbna9BYriq0vSmbRNuew94v83909xRvL/AMuoUw==","shasum":"9abd5108affa1409b25cbcc00e210cb1e6a88ea5","tarball":"http://registry-npm.ywwl.com/shq/download/shq-1.0.3.tgz","fileCount":7,"unpackedSize":6218,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEHY3MJLU08LligsCVHeqT7wuAGZ7PScD0MTn4Dql6FwIgQiNhzoxlOjgqfq2MP2QiIuqwR13l1YtF8HyfyjVPbOc="}],"size":2815,"noattachment":false,"key":"/shq/-/shq-1.0.3.tgz"},"maintainers":[{"name":"mk-pmb","email":"mk+npmjs@pimpmybyte.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shq_1.0.3_1704612896458_0.6891454383446127"},"_hasShrinkwrap":false,"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","publish_time":1704612896629,"_cnpm_publish_time":1704612896629,"dist-tags":{"latest":"1.0.3"}}