a14322f0a1a7e2da46d50fbb88dcf806.json
3.03 KB
{"ast":null,"code":"var createPadding = require('./_createPadding'),\n stringSize = require('./_stringSize'),\n toInteger = require('./toInteger'),\n toString = require('./toString');\n/**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n\n\nfunction padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n var strLength = length ? stringSize(string) : 0;\n return length && strLength < length ? string + createPadding(length - strLength, chars) : string;\n}\n\nmodule.exports = padEnd;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/lodash/padEnd.js"],"names":["createPadding","require","stringSize","toInteger","toString","padEnd","string","length","chars","strLength","module","exports"],"mappings":"AAAA,IAAIA,aAAa,GAAGC,OAAO,CAAC,kBAAD,CAA3B;AAAA,IACIC,UAAU,GAAGD,OAAO,CAAC,eAAD,CADxB;AAAA,IAEIE,SAAS,GAAGF,OAAO,CAAC,aAAD,CAFvB;AAAA,IAGIG,QAAQ,GAAGH,OAAO,CAAC,YAAD,CAHtB;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASI,MAAT,CAAgBC,MAAhB,EAAwBC,MAAxB,EAAgCC,KAAhC,EAAuC;AACrCF,EAAAA,MAAM,GAAGF,QAAQ,CAACE,MAAD,CAAjB;AACAC,EAAAA,MAAM,GAAGJ,SAAS,CAACI,MAAD,CAAlB;AAEA,MAAIE,SAAS,GAAGF,MAAM,GAAGL,UAAU,CAACI,MAAD,CAAb,GAAwB,CAA9C;AACA,SAAQC,MAAM,IAAIE,SAAS,GAAGF,MAAvB,GACFD,MAAM,GAAGN,aAAa,CAACO,MAAM,GAAGE,SAAV,EAAqBD,KAArB,CADpB,GAEHF,MAFJ;AAGD;;AAEDI,MAAM,CAACC,OAAP,GAAiBN,MAAjB","sourcesContent":["var createPadding = require('./_createPadding'),\n stringSize = require('./_stringSize'),\n toInteger = require('./toInteger'),\n toString = require('./toString');\n\n/**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\nfunction padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n}\n\nmodule.exports = padEnd;\n"]},"metadata":{},"sourceType":"script"}