{"_id":"varsize-string","_rev":"12-78cc1fee306295eba962f7cf8692a871","name":"varsize-string","description":"A package for working with strings where the different characters have different sizes.","dist-tags":{"latest":"2.2.2"},"versions":{"1.0.0":{"name":"varsize-string","version":"1.0.0","description":"A package for working with strings where the different characters have different sizes.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"istanbul cover tape test/**/*.js; standard"},"keywords":["unicode","visualwidth","terminal","wide character","wc","wide character string","wcs","terminal","width","wcwidth","wcswidth"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"ISC","devDependencies":{"standard":"^5.3.1","tape":"^4.2.2","istanbul":"^0.4.0"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/varsize-string.git"},"bugs":{"url":"https://github.com/martinheidegger/varsize-string/issues"},"homepage":"https://github.com/martinheidegger/varsize-string#readme","gitHead":"2ea70e720863acd42fe274cefbc97615c58e9b5f","_id":"varsize-string@1.0.0","_shasum":"963318e2b5c165911bfd58dc4a4702547eae2bf5","_from":".","_npmVersion":"3.3.9","_nodeVersion":"4.2.1","_npmUser":{"name":"leichtgewicht","email":"mh@leichtgewicht.at"},"maintainers":[{"name":"leichtgewicht","email":"mh@leichtgewicht.at"}],"dist":{"shasum":"963318e2b5c165911bfd58dc4a4702547eae2bf5","tarball":"https://registry.npmjs.org/varsize-string/-/varsize-string-1.0.0.tgz","integrity":"sha512-t+UelVbtTxajHZakJ22KJQYBLxMjuZHwPvTywhZtUPY3o+h0z68SFzq2o1SBnU52jK4A2ranQz9/0ULofUKkzg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAQRIpqM2sLFVSAXyxg4+QGxDoEctl2DrjrXxqKAXOt7AiBa3S1JzLaaoG7onGirhc7O40EvBzBRo5nl4AMQWmPmLA=="}]},"deprecated":"Example"},"1.0.1":{"name":"varsize-string","version":"1.0.1","description":"A package for working with strings where the different characters have different sizes.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"istanbul cover tape test/**/*.js; standard"},"keywords":["unicode","visualwidth","terminal","wide character","wc","wide character string","wcs","terminal","width","wcwidth","wcswidth"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"ISC","devDependencies":{"standard":"^5.3.1","tape":"^4.2.2","istanbul":"^0.4.0"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/varsize-string.git"},"bugs":{"url":"https://github.com/martinheidegger/varsize-string/issues"},"homepage":"https://github.com/martinheidegger/varsize-string#readme","gitHead":"f8cc02b6847d5c3c8198049ede7e9aca097b3599","_id":"varsize-string@1.0.1","_shasum":"7d7856ccad91c82f536cd5f70dc91b3fcfeaec44","_from":".","_npmVersion":"3.3.9","_nodeVersion":"4.2.1","_npmUser":{"name":"leichtgewicht","email":"mh@leichtgewicht.at"},"maintainers":[{"name":"leichtgewicht","email":"mh@leichtgewicht.at"}],"dist":{"shasum":"7d7856ccad91c82f536cd5f70dc91b3fcfeaec44","tarball":"https://registry.npmjs.org/varsize-string/-/varsize-string-1.0.1.tgz","integrity":"sha512-ub5mEO9lza23SwAUV4G1d/hBx74DZ1RC9QPbrF7NvWIhr0YvDvPwURoz2BrHrcolwSdPZflZSHHE46JaVTIIAw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC9K8O0A4PQ49k1hZPHg4d9msIovT1ofAFsz1N4SkSs3AiEAmTZshLszjBq1tSa8IWPEAOtyuTwFIsvkjpFkj+QgxXs="}]}},"2.0.0":{"name":"varsize-string","version":"2.0.0","description":"A package for working with strings where the different characters have different sizes.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"istanbul cover tape test/**/*.js; standard"},"keywords":["unicode","visualwidth","terminal","wide character","wc","wide character string","wcs","terminal","width","wcwidth","wcswidth"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"ISC","devDependencies":{"standard":"^5.3.1","tape":"^4.2.2","istanbul":"^0.4.0"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/varsize-string.git"},"bugs":{"url":"https://github.com/martinheidegger/varsize-string/issues"},"homepage":"https://github.com/martinheidegger/varsize-string#readme","gitHead":"80d508800b7d5937cddf535f8c4363f35fa19273","_id":"varsize-string@2.0.0","_shasum":"09df4ea97f9186b390c465bf627546d1c6f881cc","_from":".","_npmVersion":"3.3.9","_nodeVersion":"4.2.1","_npmUser":{"name":"leichtgewicht","email":"mh@leichtgewicht.at"},"maintainers":[{"name":"leichtgewicht","email":"mh@leichtgewicht.at"}],"dist":{"shasum":"09df4ea97f9186b390c465bf627546d1c6f881cc","tarball":"https://registry.npmjs.org/varsize-string/-/varsize-string-2.0.0.tgz","integrity":"sha512-nq6dHehnqzL1HmfMHpnyMjZAlrtp88kuXR2GG7o/pixRfGiha8xZjgeGyXw93GUDpDpixiGqj9UjjS6JkIG3Lw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkoemA+mT/99nnlh8CfDhKzv2mNabsgOk3kWMZ6W2OiQIhAJ0KF9nzpJENVyW3AyQCATQi6VmXP4LFIVHA5Q7SNys+"}]}},"2.0.1":{"name":"varsize-string","version":"2.0.1","description":"A package for working with strings where the different characters have different sizes.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"istanbul cover tape test/**/*.js; standard"},"keywords":["unicode","visualwidth","terminal","wide character","wc","wide character string","wcs","terminal","width","wcwidth","wcswidth"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"ISC","devDependencies":{"standard":"^5.3.1","tape":"^4.2.2","istanbul":"^0.4.0"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/varsize-string.git"},"bugs":{"url":"https://github.com/martinheidegger/varsize-string/issues"},"homepage":"https://github.com/martinheidegger/varsize-string#readme","gitHead":"b946c5b1d6d051dd6f4490e711738df1fe4e1bc7","_id":"varsize-string@2.0.1","_shasum":"611f2f2b74c0d7613c72c7f0dc26af19ece3fc8d","_from":".","_npmVersion":"3.3.9","_nodeVersion":"4.2.1","_npmUser":{"name":"leichtgewicht","email":"mh@leichtgewicht.at"},"maintainers":[{"name":"leichtgewicht","email":"mh@leichtgewicht.at"}],"dist":{"shasum":"611f2f2b74c0d7613c72c7f0dc26af19ece3fc8d","tarball":"https://registry.npmjs.org/varsize-string/-/varsize-string-2.0.1.tgz","integrity":"sha512-yvAfjYmXoqGeYIXMgfy1XCSc/Q0ShA3TOUaaVP3/wZ4giNXmwAiEP9IaRwneLnMehMJHP6IfAaxvEj7sp89G6g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFIrj3d0+9WS4Il3xeW3DqVT1wUNcGyvJOCFv4+ysq94AiEAo5eIwVDPvJxiCM9S7PxdonfDdfgsKkf/KFNeJNEUPLc="}]}},"2.1.0":{"name":"varsize-string","version":"2.1.0","description":"A package for working with strings where the different characters have different sizes.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"istanbul cover tape test/**/*.js; standard"},"keywords":["unicode","visualwidth","terminal","wide character","wc","wide character string","wcs","terminal","width","wcwidth","wcswidth"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"ISC","devDependencies":{"standard":"^5.3.1","tape":"^4.2.2","istanbul":"^0.4.0"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/varsize-string.git"},"bugs":{"url":"https://github.com/martinheidegger/varsize-string/issues"},"homepage":"https://github.com/martinheidegger/varsize-string#readme","gitHead":"e311aa33c634a5d3ce664771f7007f9f7802697f","_id":"varsize-string@2.1.0","_shasum":"52c7fb2e0416e90294c2bf3891eb60cfd9909e3b","_from":".","_npmVersion":"3.3.9","_nodeVersion":"4.2.1","_npmUser":{"name":"leichtgewicht","email":"mh@leichtgewicht.at"},"maintainers":[{"name":"leichtgewicht","email":"mh@leichtgewicht.at"}],"dist":{"shasum":"52c7fb2e0416e90294c2bf3891eb60cfd9909e3b","tarball":"https://registry.npmjs.org/varsize-string/-/varsize-string-2.1.0.tgz","integrity":"sha512-EOOAEA5fkwhji2OmdCUFmtt2XZjItWK6GNQQd68lkGl2J4xHwN45GEdInQcQRZkZnfEBeGuYXvVZxcp4WWRVAA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRm+envkU4AaZhBQQnZps3Yhiwymax5LwGP+D9e0eXpgIhAI/+oq4I0JfVMvlqnZPH7xJjSsQdfY0mE38at8O5MqFX"}]}},"2.1.1":{"name":"varsize-string","version":"2.1.1","description":"A package for working with strings where the different characters have different sizes.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"istanbul cover tape test/**/*.js; standard"},"keywords":["unicode","visualwidth","terminal","wide character","wc","wide character string","wcs","terminal","width","wcwidth","wcswidth"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"ISC","devDependencies":{"standard":"^5.3.1","tape":"^4.2.2","istanbul":"^0.4.0"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/varsize-string.git"},"bugs":{"url":"https://github.com/martinheidegger/varsize-string/issues"},"homepage":"https://github.com/martinheidegger/varsize-string#readme","gitHead":"423348a217478fcce90680c4aade8dc514ad1a7a","_id":"varsize-string@2.1.1","_shasum":"6d0517351b9a43511681fd24c7778d2d5f5b00fb","_from":".","_npmVersion":"3.3.9","_nodeVersion":"4.2.1","_npmUser":{"name":"leichtgewicht","email":"mh@leichtgewicht.at"},"maintainers":[{"name":"leichtgewicht","email":"mh@leichtgewicht.at"}],"dist":{"shasum":"6d0517351b9a43511681fd24c7778d2d5f5b00fb","tarball":"https://registry.npmjs.org/varsize-string/-/varsize-string-2.1.1.tgz","integrity":"sha512-49NaOKNVqP71GMgYWtrDWjlOhGtfpeB1bWCnkY90tFtkqppR60HthISD0bzqIc8dS6HUGtq4euah1kRLTg//Mw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCH1/Tsr2CswDji2jk9X/yFLqgV9nqzX+b2EbADonIj74CIQChpQrCyNnYVlLN0QOY9sz+a4P4/xmiUNExNagWOyPmqg=="}]}},"2.2.0":{"name":"varsize-string","version":"2.2.0","description":"A package for working with strings where the different characters have different sizes.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"istanbul cover tape test/**/*.js; standard"},"keywords":["unicode","visualwidth","terminal","wide character","wc","wide character string","wcs","terminal","width","wcwidth","wcswidth"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"ISC","devDependencies":{"standard":"^5.3.1","tape":"^4.2.2","istanbul":"^0.4.0"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/varsize-string.git"},"bugs":{"url":"https://github.com/martinheidegger/varsize-string/issues"},"homepage":"https://github.com/martinheidegger/varsize-string#readme","gitHead":"acbd89b0b4886b33ff479961b32cd38672ac30e4","_id":"varsize-string@2.2.0","_shasum":"866a302c007073b1e17b9da050d585320a13f043","_from":".","_npmVersion":"3.3.9","_nodeVersion":"4.2.1","_npmUser":{"name":"leichtgewicht","email":"mh@leichtgewicht.at"},"maintainers":[{"name":"leichtgewicht","email":"mh@leichtgewicht.at"}],"dist":{"shasum":"866a302c007073b1e17b9da050d585320a13f043","tarball":"https://registry.npmjs.org/varsize-string/-/varsize-string-2.2.0.tgz","integrity":"sha512-erF3cmU2dRJTD3C/3m3GjRKk8PbZq+Wy2zmQALkqWgaztlxfFRVQRLDg8UYGhxdrJ9WHDfjATouxoQSdlPh4cQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFd3ohuY/NO81BSowmWf2ohrKjzOvIKiMv5LcO7cAnT+AiB8NUtyIheRyxQPluhoysH65s87MxhyCknoEWTKunrlIw=="}]}},"2.2.1":{"name":"varsize-string","version":"2.2.1","description":"A package for working with strings where the different characters have different sizes.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"istanbul cover tape test/**/*.js; standard"},"keywords":["unicode","visualwidth","terminal","wide character","wc","wide character string","wcs","terminal","width","wcwidth","wcswidth"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"ISC","devDependencies":{"standard":"^5.3.1","tape":"^4.2.2","istanbul":"^0.4.0"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/varsize-string.git"},"bugs":{"url":"https://github.com/martinheidegger/varsize-string/issues"},"homepage":"https://github.com/martinheidegger/varsize-string#readme","gitHead":"0c9dd3e9b91e5e66cae9f1c06b24a713d4c80428","_id":"varsize-string@2.2.1","_shasum":"e6451584fa0382f389f91469626e0f5fc51fcb15","_from":".","_npmVersion":"3.8.3","_nodeVersion":"5.10.0","_npmUser":{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},"dist":{"shasum":"e6451584fa0382f389f91469626e0f5fc51fcb15","tarball":"https://registry.npmjs.org/varsize-string/-/varsize-string-2.2.1.tgz","integrity":"sha512-+XGR81tRcF5PAZEz9+d+uKa+kr/44Cy7Nqo2YLoakbbx/+RCDR1f5BbAB074sJ+eMuutIgF58JtgzfIW0zTJ6A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC4zLqMevrQxl3iILpvghmHmz1yJwsx2jm6KIfmskn3/AiBuDqz7qDdk7dJ9yscUTmW43Rf6LEuH4UYAyHrwmvQYrQ=="}]},"maintainers":[{"name":"leichtgewicht","email":"mh@leichtgewicht.at"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/varsize-string-2.2.1.tgz_1462193898310_0.9279259217437357"}},"2.2.2":{"name":"varsize-string","version":"2.2.2","description":"A package for working with strings where the different characters have different sizes.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"istanbul cover tape test/**/*.js; standard"},"keywords":["unicode","visualwidth","terminal","wide character","wc","wide character string","wcs","terminal","width","wcwidth","wcswidth"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"ISC","devDependencies":{"standard":"^5.3.1","tape":"^4.2.2","istanbul":"^0.4.0"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/varsize-string.git"},"bugs":{"url":"https://github.com/martinheidegger/varsize-string/issues"},"homepage":"https://github.com/martinheidegger/varsize-string#readme","gitHead":"c1a721f5f553948c9e0faf73c787f88f3e955b68","_id":"varsize-string@2.2.2","_shasum":"ef1b3b6c72db0835ea2f84cdf91fec30c520688b","_from":".","_npmVersion":"3.9.0","_nodeVersion":"5.10.0","_npmUser":{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},"dist":{"shasum":"ef1b3b6c72db0835ea2f84cdf91fec30c520688b","tarball":"https://registry.npmjs.org/varsize-string/-/varsize-string-2.2.2.tgz","integrity":"sha512-Wuq8/cNzDSWYYQ1KlTk6IyGrRJOMU1YX21RSgEl3psbAGdExTBOIDWd80Z1n74A/24kStNT9QgylJHVjqgRpsQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGIWV/U4M9n93MuNgrI4yTVfgRM7yzTjLTe2l7Ml8ZegIgAgM67D/aQvM+Cfz3T4MD9+5MEbS5Io/3mp7iddj/LOw="}]},"maintainers":[{"name":"leichtgewicht","email":"mh@leichtgewicht.at"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/varsize-string-2.2.2.tgz_1463924901702_0.06531212059780955"}}},"readme":"[![ISC License](https://img.shields.io/badge/license-ISC-blue.svg?style=flat)](LICENSE.md)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)\n[![npm version](https://badge.fury.io/js/varsize-string.svg)](https://badge.fury.io/js/varsize-string)\n[![Build Status](https://travis-ci.org/martinheidegger/varsize-string.svg?branch=master)](https://travis-ci.org/martinheidegger/varsize-string)\n\n# varsize-string\nVarsize-string is a JavaScript CommonJS (node.js) package for working\nwith strings where the different characters have different sizes.\n\n## Installation & Usage\nWith [npm](https://docs.npmjs.com/getting-started/installing-node) you can install and use the `varsize-string` like this:\n\n```\n$ npm install varsize-string --save\n```\n\nWith the package being successfully installed you can create an instance like this:\n\n```JavaScript\nfunction charWidth(charCode, formerCharCode, inString, pos) {\n    /* in this example a-z (lower-case) is 0.8 the width of other characters */\n    return (charCode >= 97 && charCode <= 122 ) ? 0.8 : 1\n}\nvar VarSizeString = require('varsize-string')\nvar str = new VarSizeString('ABCdef', charWidth)\nvar str2 = VarSizeString('abcDEF', charWidth) // You don't need to use `new`\n```\n\n## Application\nThe most important application of `varsize-string` is in combination with \n[`wcsize`](https://github.com/martinheidegger/wcsize) that identifies the size of strings rendered in a common terminal,\nsee [`wcstring`](https://github.com/martinheidegger/wcstring) for a shorthand combination of both.\n\nIt can also be used in a (visual) web context to correctly `wrap` or `truncate` strings.\n\n## Operations\nOn the instance you can apply a set of operations. Note that the following explanation uses `size` as an accumulated amount of width and `width` as a single-line `size`.\n\n### `.width()`\nGet the `size` of the widest line in the string. \n\n### `.size()`\nGet the `size` of the complete string.\n\n### `.sizeBeforeFirst(search, [<int> startOffset])`\nAnalogous to [`String.indexOf`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf). Looks for the first occurance of `search`. Optionally takes `startOffset` which is the `size` of characters that have to happen before the search takes place (default=0).\n\n### `.sizeBeforeLast(search, [<int> endOffset])`\nAnalogous to [`String.lastIndexOf`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf). Looks for the last occurance of `search`.\nOptionally takes `endOffset` which is the size offset from the end of the string from which to search for `search`.\n\n### `.substring(<int> startSize, [<int> endSize])`\nAnalogous to [`String.substring`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/substring). This method will return the **fully visible** characters between `startSize` and `endSize`. If `endSize` is not given it will assume a substring from `startSize` until the end of the string.\n_However:_ **Unlike** `String.substring`, this method returns an object with the properties `size` and `string` in order to know the size of the substring.\n\nExample:\n```JavaScript\nvar vsstring = require('varsize-string')\nvsstring('abcdef', charWidth).substring(0, 3) // {string: 'abc', size: 2.4}\n```\n\n### `.substr(<int> startSize, [<int> size])`\nEqual to `.substring(startSize, startSize + size)`.\n\n\n### `.truncate(<int> size, <varsize-string || String> suffix)`\nTruncates the string after a size. Will append the given `suffix` to the string if it does exceed the size.\n\n### `.pop()`\nRemoves the last character from the string and returns the new `.size()`.\n\n### `.wrap(<int> width, [padding])`\nNormalizes the string in order for all lines to fit within `width`.\n\nExample:\n```JavaScript\nvar vsstring = require('varsize-string')\nvsstring('abcdef', charWidth).wrap(3) // 'abc\\ndef'\nvsstring('ab cd ef', charWidth).wrap(5) // 'ab cd\\nef'\nvsstring('ab cd ef', charWidth).wrap(3) // 'ab\\ncd\\nef'\n```\n\n#### Padding\nThe padding option takes a padding specification and applies it to the\nwrapping process.\n\nExample:\n\n```JavaScript\nvar padding = {\n    first: {left: ' - ', right: ' '},\n    regular: {left: '   ', right: ' '}\n}\nvsstring('abcdefghijklmnop', charWidth).wrap(10, padding)\n//  - abcdef\n//    ghijkl\n//    mnop\n```\n\nThere are a few shorthands to specifying the padding:\n\n```JavaScript\npadding = '  '\n```\n\n... is equals to ...\n\n```JavaScript\n{\n    first: '  ',\n    regular: '  '\n}\n```\n\n... is equals to ...\n\n```JavaScript\n{\n    first: {left: '  ': right: undefined},\n    regular: {left: '  ': right: undefined}\n}\n```\n\nAlso you can preset left/right for both first and regular:\n\n```JavScript\n{\n    right: 'x',\n    first: {left: ' - '},\n    regular: {left: '   '}\n}\n```\n\n... is equal to ... \n\n```JavaScript\n{\n    first: {left: ' - ', right: 'x'},\n    regular: {left: '   ', right: 'x'}\n}\n```\n\nNote that the left/right presets override the first/regular specification:\n\n```JavaScript\n{\n    left: 'x',\n    first: '-',\n    regular: ' '\n}\n```\n\n... is equal to ...\n\n```JavaScript\n{\n    first: {left: 'x', right: undefined},\n    regular: {left: 'x', right: undefined}\n}\n```\n\nAlso it supports a fallback to regular if first is missing:\n\n```JavaScript\n{\n    regular: {left: 'x', right: undefined}\n}\n```\n\n... is equal to ...\n\n```JavaScript\n{\n    first: {left: 'x', right: undefined},\n    regular: {left: 'x', right: undefined}\n}\n```\n\n### `vsstring.padding(characterLookup, [process], [width], padding)`\nTurns a flexible padding definition into a clear padding definition. You can pass in an optional `process` variable to process the strings before they are being turned into varsizes-strings. You can also pass-in a `width` to make sure that the padding will not exceed the width of, say, a wrapped string.\n","maintainers":[{"name":"leichtgewicht","email":"mh@leichtgewicht.at"}],"time":{"modified":"2022-06-28T09:10:01.416Z","created":"2015-10-31T19:44:29.377Z","1.0.0":"2015-10-31T19:44:29.377Z","1.0.1":"2015-11-01T04:35:38.228Z","2.0.0":"2015-11-02T22:18:14.797Z","2.0.1":"2015-11-02T22:21:31.281Z","2.1.0":"2015-11-05T03:16:46.300Z","2.1.1":"2015-11-05T03:41:07.248Z","2.2.0":"2015-11-05T04:42:24.626Z","2.2.1":"2016-05-02T12:58:18.717Z","2.2.2":"2016-05-22T13:48:24.174Z"},"homepage":"https://github.com/martinheidegger/varsize-string#readme","keywords":["unicode","visualwidth","terminal","wide character","wc","wide character string","wcs","terminal","width","wcwidth","wcswidth"],"repository":{"type":"git","url":"git+https://github.com/martinheidegger/varsize-string.git"},"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"bugs":{"url":"https://github.com/martinheidegger/varsize-string/issues"},"license":"ISC","readmeFilename":"Readme.md"}