@spare/liner
Advanced tools
Comparing version 0.3.9 to 0.3.11
@@ -14,2 +14,4 @@ 'use strict'; | ||
}; | ||
const LFREG = /\n/; | ||
const COREG = /,/; | ||
const liner = (lines, { | ||
@@ -23,3 +25,3 @@ discrete = false, | ||
const hover = !!bracket$1; | ||
const joined = lines.length && /\n/.test(delim) ? joinLines(lines, /,/.test(delim) ? enumChars.CO : '', level, hover) : lines.join(delim); | ||
const joined = lines.length && LFREG.test(delim) ? joinLines(lines, COREG.test(delim) ? enumChars.CO : '', level, hover) : lines.join(delim); | ||
return bracket.br(joined, bracket$1); | ||
@@ -26,0 +28,0 @@ }; |
@@ -10,2 +10,4 @@ import { TB, LF, CO } from '@spare/enum-chars'; | ||
}; | ||
const LFREG = /\n/; | ||
const COREG = /,/; | ||
const liner = (lines, { | ||
@@ -19,3 +21,3 @@ discrete = false, | ||
const hover = !!bracket; | ||
const joined = lines.length && /\n/.test(delim) ? joinLines(lines, /,/.test(delim) ? CO : '', level, hover) : lines.join(delim); | ||
const joined = lines.length && LFREG.test(delim) ? joinLines(lines, COREG.test(delim) ? CO : '', level, hover) : lines.join(delim); | ||
return br(joined, bracket); | ||
@@ -22,0 +24,0 @@ }; |
{ | ||
"name": "@spare/liner", | ||
"version": "0.3.9", | ||
"version": "0.3.11", | ||
"description": "Join lines together", | ||
@@ -18,5 +18,5 @@ "main": "dist/index.cjs.js", | ||
"dependencies": { | ||
"@spare/bracket": "^0.3.9", | ||
"@spare/enum-brackets": "^0.3.9", | ||
"@spare/enum-chars": "^0.3.9" | ||
"@spare/bracket": "^0.3.11", | ||
"@spare/enum-brackets": "^0.3.11", | ||
"@spare/enum-chars": "^0.3.11" | ||
}, | ||
@@ -39,3 +39,3 @@ "repository": { | ||
"homepage": "https://github.com/hoyeungw/spare#readme", | ||
"gitHead": "028ebcbe8435520c001ae45a558c5682333f77e6" | ||
"gitHead": "0f2272e589b9f17eedd9892b40a4fee4faa4200c" | ||
} |
5468
47
Updated@spare/bracket@^0.3.11
Updated@spare/enum-brackets@^0.3.11
Updated@spare/enum-chars@^0.3.11