{"name":"pad","description":"Left and right string padding","version":"2.2.0","author":{"name":"David Worms","email":"david@adaltas.com"},"contributors":[{"name":"David Worms","email":"david@adaltas.com"}],"devDependencies":{"babel-cli":"^6.26.0","babel-preset-es2015":"^6.24.1","coffeescript":"^2.3.1","mocha":"^5.2.0","should":"^13.2.3"},"engines":{"node":">= 4.0.0"},"homepage":"https://github.com/adaltas/node-pad","keywords":["pad","string"],"license":"BSD-3-Clause","main":"./lib","repository":{"type":"git","url":"git+https://github.com/adaltas/node-pad.git"},"scripts":{"preversion":"grep '## Trunk' CHANGELOG.md && npm test","version":"version=`grep '^  \"version\": ' package.json | sed 's/.*\"\\([0-9\\.]*\\)\".*/\\1/'` && sed -i \"s/## Trunk/## Version $version/\" CHANGELOG.md && git add CHANGELOG.md","postversion":"git push && git push --tags && npm publish","patch":"npm version patch -m 'Bump to version %s'","minor":"npm version minor -m 'Bump to version %s'","major":"npm version major -m 'Bump to version %s'","coffee":"coffee -b -o lib src && cd lib && babel *.js  -d es5 && cd ..","pretest":"coffee -b -o lib src && cd lib && babel *.js  -d es5 && cd ..","test":"mocha test/**/*.coffee"},"dependencies":{"wcwidth":"^1.0.1"},"types":"lib/index.d.ts","gitHead":"60076a566bc52cf63e1bdb0eb51232a584ad93fb","bugs":{"url":"https://github.com/adaltas/node-pad/issues"},"_id":"pad@2.2.0","_npmVersion":"6.2.0","_nodeVersion":"10.0.0","_npmUser":{"name":"david","email":"david@adaltas.com"},"dist":{"integrity":"sha512-t2UVfAe0MKo2wQEtm+OQNb0PI8KhNcwO1Ewkjd0GrACsLe3Mf8IfPLc4HEtjhiY+jOK89/98FBJ1fbAcofsCNA==","shasum":"fcceb21ef720346be733b835fcd48775f3c6d52e","tarball":"http://registry-npm.ywwl.com/pad/download/pad-2.2.0.tgz","fileCount":11,"unpackedSize":10428,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfyZICRA9TVsSAnZWagAAQ/gQAJof5GWfTAu2xpFepWlq\nehcrepCawVWidMw2TygIYS9KqD0sK+YqxTle72lgH5AOETLF8om3TWUBvPJV\nzPCkAxsMOTxPgcjHX+SixDaXoMI4qo7zR1PbSehDE/g2JtB0VFtIbOWscrj4\n05ytMXZeR3aAPoH1+zuhlStSRkWj2TFo8zllckwbzDhbGEic4Py81dowYNwD\n4/vFIUeb/IN2+QGa1Pw7+2ZL+rTBzpBcAtIjuk1optf/eytcqv9JY69MiXhz\nQF8EZVCuJ5gWEr/cch0hHo4Lo41zCkLH7PF67RQRs1hX0RvLFtQFavIzpS5M\nLAEckPrOWQfMvPDYs8mwUbGc28iVSIbbA02Zg0Ec0SKNhTQ5S3uoMWf6o6Co\nO4kA4gry3SYDevvLGtToyNYMywC7d9pbJ2izdPeNVG9APIhs7R7Jl+z99c94\nfrYLHp/skGiQxJle7q9sCI0LSDV434X5er39+cxPyV5cG7yUEVIiuaEf89Gq\n9VPu25z84gloohNwf36q/3ERjSgZBIZ/Bm/rpykPzX89/Nh/AviQn3QR8xlE\niyqyV7pnDu9JqMxH3mEe9NDRwYPPNssKvGuajn8nvCxFXIFYwl8Rw1LI1LNP\nuG6NiY+C+3ZVUMLTNt/Skkfgg1Q2LMMexGuiOQbPI9v8X8+XqWVhSZGAOpuQ\nMojW\r\n=bdjI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHTNn84whV7x5ndaG1Pu1XhQ91HfzYbFIoCU62YBDnXwAiEAl0yFXxLUnqsu5zdKQ2mbIofU4ESn3gxVFxayQVMJI0U="}],"size":3974,"noattachment":false,"key":"/pad/-/pad-2.2.0.tgz"},"maintainers":[{"name":"david","email":"david@adaltas.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pad_2.2.0_1535059527630_0.9478146512556056"},"_hasShrinkwrap":false,"readme":"\n# Node.js pad\n\n[![Build Status](https://secure.travis-ci.org/adaltas/node-pad.png)](http://travis-ci.org/adaltas/node-pad)\n\nNode Pad is a simple and elegant function to pad strings in both left and right directions.\n\n## Usage\n\nThe API is quite simple:\n\n```javascript\nconst pad = require('pad')\npad('pad', 5)      // \"pad  \"\npad(5, 'pad')      // \"  pad\"\npad('pad', 5, '+') // \"pad++\"\npad(5, 'pad', '+') // \"++pad\"\n```\n\nFor TypeScript users, the type definition files are located in \"./lib/index.d.ts\" and declared inside the \"package.json\" file.\n\n## Bundles\n\nNode Pad comes in multiple flavours depending on your target environment:\n\n* CommonJS: `dist/pad.cjs.js`   \n  Bundle used by Node.js and compatible with ES5. It is declared inside the `package.json` by the `main` property and used by default with `require(\"pad\")` in a Node.js environment.\n* ES module: `dist/pad.esm.js`   \n  Bundle using the ECMAScript standard defined in ES6 for working with modules. The path to the ES module is declared inside the `package.json` by the `module` property for ESM-aware tools like [Rollup](https://rollupjs.org) and [webpack 2+](https://webpack.js.org/).\n* UMD: `dis/pad.umd.js`\n  Bundle in the Universal Module Definition (UMD), a format compatible with both AMD and CommonJS.\n\nThe CommonJS syntax to import Node Pad is:\n\n```js\nconst pad = require(\"pad/dist/pad.cjs.js\")\n// Or simply\nconst pad = require(\"pad\")\n```\n\nWhile the ES Modules syntax is:\n\n```js\nimport pad from \"pad/dist/pad.esm.js\"\n// Or for ESM-aware tools\nimport pad from \"pad\"\n```\n\n## Options\n\nOptions are provided as a third argument and are all optional. A string argument\nit is interpreted as the \"char\" option. Accepted options include:\n\n* `char` (string)   \n  The character used to fill the gap.\n* `colors` (boolean)   \n  Ajust to hidden terminal color characters, you may also use `require 'pad/lib/colors'` to avoid passing this option.\n* `strip` (boolean)   \n  Remove characters from text if length smaller than text length, default to \"false\".\n* `fixed_width` (boolean)   \n  An optimization option to disable the usage of the wcwdith package to handle the discovery of characters using more than one column for display.\n  one column to display\n* `wcwidth_options` (object)   \n  Options passed to the wcwidth package used to calculate the display width of\n  characters using more than one column.\n\n## Left padding: `pad(length, text, [options])`\n\nLeft padding occurs when the first argument is a number and the second\nargument is a string.\n\n```javascript\nvar pad = require('pad');\npad(5, 'pad', '-').should.eql('--pad');\n```\n\n## Right padding: `pad(text, length, [options])`\n\nRight padding occurs when the first argument is a string and the second\nargument is a number.\n\n```javascript\nvar pad = require('pad');\npad('pad', 6).should.eql('pad   ');\n```\n\n## Installing\n\nStarting with version 1.1.0, Node pad rely on Node.js 4.0.0 or more recent.\nStick to version 1.0.x if using an older version of Node.js.\n\nVia [npm](http://github.com/isaacs/npm):\n\n```bash\nnpm install pad\n```\n\nVia git (or downloaded tarball), copy or link the project from a discoverable\nNode.js directory:\n\n```bash\ngit clone http://github.com/wdavidw/node-pad.git\n```\n\n## Testing\n\nClone the repo, install the development dependencies and run the suite:\n\n```bash\ngit clone http://github.com/wdavidw/node-pad.git .\nnpm install\nmake test\n```\n","publish_time":1535059527775,"_cnpm_publish_time":1535059527775,"dist-tags":{"latest":"3.3.0"}}