{"name":"pad","description":"Left and right string padding","version":"3.1.0","author":{"name":"David Worms","email":"david@adaltas.com"},"contributors":[{"name":"David Worms","email":"david@adaltas.com"}],"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.4.0","@babel/preset-env":"^7.4.2","coffeescript":"^2.4.0","mocha":"^6.0.2","rollup":"^1.9.0","rollup-plugin-babel":"^4.3.2","should":"^13.2.3"},"engines":{"node":">= 4.0.0"},"homepage":"https://github.com/adaltas/node-pad","keywords":["pad","string"],"license":"BSD-3-Clause","main":"dist/pad.cjs.js","module":"dist/pad.esm.js","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'","build":"coffee -b -o lib src && rollup -c && rm -r lib && cp -p src/index.d.ts dist/pad.d.ts","pretest":"npm run build","test":"mocha test/**/*.coffee"},"dependencies":{"rollup-plugin-commonjs":"^9.3.4","rollup-plugin-node-resolve":"^4.2.3","wcwidth":"^1.0.1"},"types":"dist/pad.d.ts","gitHead":"ffb19e8bdcfaaebb620c10c4d4c80176aea32929","bugs":{"url":"https://github.com/adaltas/node-pad/issues"},"_id":"pad@3.1.0","_nodeVersion":"11.13.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-LO+19JE+tR8mXNkw57yAhW0/pOZ2K5wdexECfgdOqrPL4LbJ0FKXTN0I/Fant/Hs1VI07Sp91wBgTWFYQJURsA==","shasum":"45ae993df366ca01c3e43cdd21ec9878bb74c0d9","tarball":"http://registry-npm.ywwl.com/pad/download/pad-3.1.0.tgz","fileCount":8,"unpackedSize":47064,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2TEYCRA9TVsSAnZWagAApOgP/3XkaN6flYn4lXJN0gEI\nfmaE3TusOcF52q1uc+wRInCFG1h+EBWPczH7x07fOgYbnTym+QQnCqyR+piW\naybAPREoRZNr0B0VcZryi3x1vWfbrj9M/SlIsIdBdIc/otWJlw8gnGrV4qJ6\nmEVzu9+ksISZ8pyBuooYrVCe76DsyyEpQpwDhdl7aq1aY8QtWvk4k0MwY2fe\nElXv0iOqW1FKH8vbP6h6cVGW3gmCt/0uqo6e47JvzhhhwVeO5iNOKRmil1Ef\nNNB1gARKdNI/825kDTbZsq2ebICTPM0X821y/SadDguSQilL9tEH+SSzQ3HH\nVVCqbbzFH0S4pMp3Sxj1i7He/pK6YQPG57jNGTN8jzNK+5DUuPPQJ3G5+d78\nC3bu16PaurogABslY8Fz29mmeslIxFFgIDArwWZ5/NIUCY/MATM7P/K8Gn/y\nPA+xg8qfp7mcG4QYTn6RaaeBVAuNr2ydIxPhV8cV5pYpkiupV8CmEZdAdfzc\nURA56KpvHZ7fWOgjqioilsZvAzLvtlVtj/wsfuOp4HGx/vro26YvhqyRHjkq\nvc/8JzQDlbkiWNp7HqNsrImbV03Yfb0VFRMMG8jIy4Ocy7kdbTTERNzNGbD/\nAi/zQomBqLjai7r/G3jHSTLAtQqfGHX0jWWrQ8kHzv/4AmhKuJQbErgLJ+O7\nOvdy\r\n=gro+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG92BwBCuEpVkJBCRNrW5TP9NijjnOl5oIVLFBfKoLZrAiBWOJUZjpacc3uWl8N/dKkyxxpz9tiqq5Ot1KIITSb/LA=="}],"size":9266,"noattachment":false,"key":"/pad/-/pad-3.1.0.tgz"},"maintainers":[{"name":"david","email":"david@adaltas.com"}],"_npmUser":{"name":"david","email":"david@adaltas.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pad_3.1.0_1557737752245_0.8756891923387518"},"_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":1557737752391,"_cnpm_publish_time":1557737752391,"dist-tags":{"latest":"3.3.0"}}