roberto-butti / some-drops-of-javascript

This book collects some useful, unknown, underrated JavaScript functions discovered and learned while using JavaScript daily.
https://drops-of-javascript.hi-folks.dev/
Other
137 stars 40 forks source link

Add new functions for padding strings #24

Closed GriffinAnnshual closed 11 months ago

GriffinAnnshual commented 11 months ago

What

Add a new method documentation file for a new JavaScript function in src/content/docs. The instructions about defining the file's name are documented in the CONTRIBUTING.md file. fixes #22

Description

Function name: padStart() and padEnd() Function description: padStart() pads a string by adding characters (by default, spaces) to the left end of the string until it reaches the specified targetLength. padEnd(targetLength, padString): padEnd() pads a string by appending characters (default: spaces) to the right end of the string until it reaches the given targetLength.

File name: src/content/docs/05-string/02_str-padding.md

Checklist

  • [x] create the file with the proper name
  • [x] create the documentation of the function
  • [x] write example in examples directory
  • [x] execute bun run format-examples-bun or npm run format-examples
  • [x] commit and open the PR.

Must read:

vercel[bot] commented 11 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
some-drops-of-javascript ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 25, 2023 6:52am
roberto-butti commented 11 months ago

Thank you @GriffinAnnshual as contributor. Great PR! I'm going to merge it. Closes #22