* Parses JSON string, if fails returns null * @param {Object|Array} string
(string)
| 206 | * @param {Object|Array} string |
| 207 | */ |
| 208 | parseJSON(string) { |
| 209 | if (!string) return null; |
| 210 | try { |
| 211 | return JSON.parse(string); |
| 212 | } catch (e) { |
| 213 | return null; |
| 214 | } |
| 215 | }, |
| 216 | /** |
| 217 | * Checks whether given type is directory or not |
| 218 | * @param {'dir'|'directory'|'folder'} type |
nothing calls this directly
no outgoing calls
no test coverage detected