Change Log
All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
10.1.1 (2020-11-12)
10.1.0 (2019-11-23)
Features
- Add
iterateLastCharCodes
which is slightly more efficient thaniterateLastChars
. (5e27b85)
Performance Improvements
- Use
charCodeAt
instead of indexing into the string (to avoid an allocation). (48b4e3e)
10.0.0 (2019-09-02)
Bug Fixes
- #32 - Doing a non-escaped newline within a string literal would not properly update the writer state. (a155e47)
Code Refactoring
BREAKING CHANGES
indentBlock
is now merged withindent
.withHangingIndentation
is nowhangingIndent
.
9.4.1 (2019-07-16)
Bug Fixes
- Remove accidentally added chai dependency. (582b4b6)
9.4.0 (2019-06-18)
Features
- Add
unsafeInsert
. (88cce9a)
9.3.0 (2019-06-09)
Features
- Add
#endsWith(text: string)
(460e007)
9.2.1 (2019-05-31)
Bug Fixes
- Make private function not show up in declaration file. (3263724)
9.2.0 (2019-05-31)
Features
9.1.3 (2019-05-20)
Bug Fixes
- Fix incorrect jsdoc in
withIndentationLevel
(8e26c5f)
Performance Improvements
- No longer pushes empty strings onto internal array. (4d46a72)
8.3.0 (2019-05-05)
Features
- Add
#withHangingIndentation
(2c77357)
8.2.0 (2019-05-05)
Features
- Add
#withQueuedIndentationLevel
and#withIndentationLevel
. (1bcf7c8)
8.1.2 (2019-05-02)
Bug Fixes
- Hide remaining private methods/properties from declaration file. (5e7aaef)
8.1.1 (2019-05-02)
Bug Fixes
- Restrict
newLine
to “\n” | “\r\n”. (699a41f)
Performance Improvements
- Calling
#getLength()
does not internally call#toString()
. (b19c7ab) - Calling
#isLastBlankLine()
does not internally call#toString()
. (d225b67)
8.1.0 (2019-05-02)
Features
8.0.0 (2019-04-28)
Performance Improvements
BREAKING CHANGES
- Library now targets ES2015 instead of ES5.
7.3.1 (2019-04-14)
Bug Fixes
isInString()
was not handling escaped string characters. (a357278)
7.3.0 (2019-03-16)
Bug Fixes
- Should not write space on block if last was a newline. (37706b9)
Features
7.2.2 (2018-09-27)
Performance Improvements
7.2.1 (2018-07-14)
Bug Fixes
- Queued indentation would not by applied when not writing anything and doing a .newline(). (2d33d46)
7.2.0 (2018-05-28)
Features
- Allow passing in a decimal indentation level. (c77fa14)
7.1.0 (2018-05-08)
Features
- Add .tab(), .tabIfLastNot(), .isLastTab() (0e6f6e9)
7.0.0 (2018-04-29)
Code Refactoring
- Remove deprecated methods. (e7fca86)
Features
- allow passing a function into conditional write methods (d299c84)
BREAKING CHANGES
newLineIfLastNotNewLine
,blankLineIfLastNotBlankLine
,spaceIfLastNotSpace
are removed. Use the shorter method names likespaceIfLastNot
.
6.14.0 (2018-04-10)
Features
- allow passing a function into conditional write methods (d299c84)
Thanks a lot to @lazarljubenovic for implementing this feature!
6.13.0 (2018-04-08)
Features
- Add getOptions(). (a58dc31)
6.12.0 (2018-04-07)
Bug Fixes
- Remove warning for now. (ee36fac)
Features
- Add .isAtStartOfFirstLineOfBlock() (d5eda32)
6.11.0 (2018-04-07)
Features
- Add .isOnFirstLineOfBlock() (b2a10c6)
6.10.1 (2018-04-04)
Bug Fixes
- Remove warning for now. (ee36fac)
6.10.0 (2018-04-03)
Features
- Deprecate all XIfLastNotX methods to XIfLastNot. (d6c31f1)
6.9.0 (2018-04-03)
Features
6.8.0 (2018-04-03)
Features
- Add conditionalBlankLine. (7801d42)
6.7.2 (2018-03-31)
Bug Fixes
- Should not be in a string when using a string char in a regular expression literal. (70e88a5)
6.7.1 (2018-03-27)
Bug Fixes
- Writing within quote should escape string chars. (bd9ddaa)
6.7.0 (2018-03-25)
Features
- Add .space() method. (d3a7134)
6.6.0 (2018-02-28)
Features
- Add .getIndentationLevel() (949acb0)
6.5.3 (2018-02-28)
Bug Fixes
- Fix incorrect double newline after indentBlock (8ff5766)
6.5.2 (2018-02-27)
Bug Fixes
- isLastNewLine() should return true when it’s \n and newline kind is \r\n. (347f783)
6.5.1 (2018-02-27)
Bug Fixes
- Should do a conditional newline when starting an indent block. (109c71f)
6.5.0 (2018-02-27)
Features
- Add indentBlock to indent a block of code. (e69205c)
6.4.1 (2018-02-27)
Bug Fixes
- Passing an empty string at the start of a line should write the current indentation. (f3b3ed8)
6.4.0 (2018-02-27)
Features
- isLastNewLine, isLastSpace, getLastChar (d4d850e)
6.3.1 (2018-02-27)
Bug Fixes
- Include js docs. (c01c697)
6.3.0 (2018-02-27)
Features
- Add queueIndentationLevel(…). (6719913)
6.2.0 (2017-12-05)
Features
6.1.1 (2017-12-02)
Bug Fixes
- Fixed out of date definition file. (f9d6a07)
6.1.0 (2017-12-02)
Features
- Ability to provide undefined for conditions and blocks. (9c48b3a)
6.0.0 (2017-12-02)
Bug Fixes
- Add documentation comments. (d3b5031)
- Should be allowed to have two newlines at the end of a file. (3855742)
Features
BREAKING CHANGES
- #12 - Library is now JS/TS specific and will not indent text on newlines while in a string.