v1.2.0 - A bunch of other native string methods π
New features π
More methods: as we approach 800βοΈ (!!!) we are actively developing strongly-typed counterparts of native string functions.
This versions adds padStart
, padEnd
, includes
, startsWith
, endsWith
, and our own truncate
method.
Is there any method you'd like to see added to this library? Check the section below.
Roadmap πΊοΈ
We setup a list in our roadmap and that list is close to completion. Now there are other methods we might implement or not, so make sure you join the discussion if you want to see some of the β methods implemented!
Fixes π
- The
replace
now will accept a Regex but if you do it, the resulting type is gonna be loosened tostring
as TS doesn't do Regex yet. - The casing methods, such as
toCamelCase
,toDelimiterCase
, will strip out more separators. Even though it is breaking we consider it a bugfix astoCamelCase('hello [world]')
would previously result in"hello[World]"
and now it will be"helloWorld"
- The
slice
method is not a partial implementation anymore! Now we support the whole native API so you can send positive and negative indexes to both startIndex and endIndex parameters.
PR list π
- fix: Fix
slice
negative start and end indexes by @gustavoguichard in #28 - feat: add
startsWith
andendsWith
by @jly36963 in #27 - feat: Add strongly-typed
repeat
alternative by @gustavoguichard in #30 - feat: add
padStart
andpadEnd
methods by @gustavoguichard in #31 - chore: Update README.md to include supported TS versions by @gustavoguichard in #38
- feat: add
includes
by @jly36963 in #39 - refactor:
replace
with regex by @jly36963 in #42 - fix!: update separators by @jly36963 in #40
- feat: add
truncate
function by @p9f in #41 - docs: section headers by @jly36963 in #43
- chore: Code organization by @gustavoguichard in #45
New contributor π«Ά
@p9f had already contributed to the library but now he is an official contributor.
Full Changelog: v1.1.0...v1.2.0