Skip to content

Commit

Permalink
.format(): add 'i' mode to %I, %Y and %O
Browse files Browse the repository at this point in the history
  • Loading branch information
cronvel committed Sep 14, 2022
1 parent b805cda commit 9c3df9f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

v0.17.6
-------

.format(): add 'i' mode to %I, %Y and %O


v0.17.5
-------

Expand Down
3 changes: 3 additions & 0 deletions browser/string-kit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2048,6 +2048,9 @@ function genericInspectMode( arg , modeArg , options , modeOptions , isInspectEr
if ( v === '+' ) { style = 'color' ; }
else if ( v === '-' ) { style = 'none' ; }
}
else if ( k === 'i' ) {
style = 'inline' ;
}
else if ( k === 'l' ) {
// total output max length
outputMaxLength = parseInt( v , 10 ) || undefined ;
Expand Down
2 changes: 1 addition & 1 deletion browser/string-kit.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions lib/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,9 @@ function genericInspectMode( arg , modeArg , options , modeOptions , isInspectEr
if ( v === '+' ) { style = 'color' ; }
else if ( v === '-' ) { style = 'none' ; }
}
else if ( k === 'i' ) {
style = 'inline' ;
}
else if ( k === 'l' ) {
// total output max length
outputMaxLength = parseInt( v , 10 ) || undefined ;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "string-kit",
"version": "0.17.5",
"version": "0.17.6",
"engines": {
"node": ">=14.15.0"
},
Expand Down

0 comments on commit 9c3df9f

Please sign in to comment.