(key)
| 206 | } |
| 207 | |
| 208 | function serializeKey (key) { |
| 209 | if (key.length === 0) { |
| 210 | return quoteString(key, true) |
| 211 | } |
| 212 | |
| 213 | const firstChar = String.fromCodePoint(key.codePointAt(0)) |
| 214 | if (!util.isIdStartChar(firstChar)) { |
| 215 | return quoteString(key, true) |
| 216 | } |
| 217 | |
| 218 | for (let i = firstChar.length; i < key.length; i++) { |
| 219 | if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { |
| 220 | return quoteString(key, true) |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | return key |
| 225 | } |
| 226 | |
| 227 | function serializeArray (value) { |
| 228 | if (stack.indexOf(value) >= 0) { |
no test coverage detected
searching dependent graphs…