@kizmann/pico-js 0.3.31 → 0.3.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kizmann/pico-js",
3
- "version": "0.3.31",
3
+ "version": "0.3.32",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "author": "Eduard Kizmann <kizmann@protonmail.ch>",
@@ -109,7 +109,7 @@ export class Str
109
109
 
110
110
  static array(value, fallback = null)
111
111
  {
112
- let matches = value.match(/((?<=(\[|,))(.*?)(?=(,|\])))+/g);
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