@kizmann/pico-js 0.3.31 → 0.3.32
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/pico-js.js +1 -1
- package/dist/pico-js.js.map +1 -1
- package/package.json +1 -1
- package/src/utility/string.js +3 -3
package/package.json
CHANGED
package/src/utility/string.js
CHANGED
@@ -109,7 +109,7 @@ export class Str
|
|
109
109
|
|
110
110
|
static array(value, fallback = null)
|
111
111
|
{
|
112
|
-
let matches = value.match(/((?<=(
|
112
|
+
let matches = value.match(/((?<=(@\[|,))(.*?)(?=(,|\])))+/g);
|
113
113
|
|
114
114
|
if ( ! Any.isArray(matches) ) {
|
115
115
|
return fallback;
|
@@ -122,11 +122,11 @@ export class Str
|
|
122
122
|
|
123
123
|
static real(value)
|
124
124
|
{
|
125
|
-
if ( typeof value === 'string' && value.match(
|
125
|
+
if ( typeof value === 'string' && value.match(/^@\[.*?\]$/) ) {
|
126
126
|
value = Str.array(value);
|
127
127
|
}
|
128
128
|
|
129
|
-
if ( typeof value === 'string' && value.match(/^(null)$/i) ) {
|
129
|
+
if ( typeof value === 'string' && value.match(/^(null|undefined)$/i) ) {
|
130
130
|
value = null;
|
131
131
|
}
|
132
132
|
|