panzerdp / voca

The ultimate JavaScript string library
https://vocajs.pages.dev
MIT License
3.6k stars 136 forks source link

v.padLeft('bird', 6, '-'); in document tells result should be '--bird-', but browser result is "--bird" #5

Closed caoglish closed 7 years ago

caoglish commented 7 years ago

Welcome to Voca's GitHub repo!

Expected behavior :smile_cat:

in document https://github.com/panzerdp/voca/blob/master/src/manipulate/pad_left.js https://vocajs.com/#padLeft shows:

v.padLeft('bird', 6, '-');
// => '--bird-'

Actual behavior :crying_cat_face:

v.padLeft('bird', 6, '-');

resrult: "--bird"

Steps to reproduce :construction_worker:

  1. brower access voca official document and open dev mode.
  2. tyep: v.padLeft('bird', 6, '-');

Technical details: :wrench:

Browser/OS type: firefox/chrome

comments

The document should be the mistake by my understand.

panzerdp commented 7 years ago

Hi @caoglish,

Thanks for reporting. :+1: The documentation fixed.