Add an option to disable escape code stripping#12
Add an option to disable escape code stripping#12joepie91 wants to merge 1 commit intosindresorhus:mainfrom
Conversation
index.js
Outdated
| const charRegex = require('char-regex'); | ||
|
|
||
| const stringLength = string => { | ||
| const stringLength = (string, options = {}) => { |
There was a problem hiding this comment.
| const stringLength = (string, options = {}) => { | |
| const stringLength = (string, {ignoreAnsiEscapeCodes = false} = {}) => { |
There was a problem hiding this comment.
Shouldn't this be something like countAnsiEscapeCodes = true?
There was a problem hiding this comment.
Fair point, not sure why I went with a negative phrasing. Will change.
| ``` | ||
|
|
||
| You should only ignore escape codes when working with terminal-related strings; otherwise, you should disable `ignoreEscapeCodes` (which defaults to `true`). This default will change in a future breaking release. | ||
|
|
There was a problem hiding this comment.
The option needs a API section as done here: https://github.com/sindresorhus/boxen#api
|
@joepie91 Bump |
|
Oops, sorry, this totally escaped me! Apparently GMail's Snooze feature is not to be trusted... I'll have a look at this tomorrow. |
efb1fb4 to
bf76310
Compare
|
All issues should be resolved now :) |
Richienb
left a comment
There was a problem hiding this comment.
The TypeScript definition and type tests need to be updated
I have no idea how to test that. |
|
Friendly bump :) |
Fixes #11.