mirror of
https://github.com/typicode/json-server.git
synced 2025-07-29 13:14:12 +08:00
style update to standard v7
This commit is contained in:
@ -8,9 +8,11 @@ module.exports = {
|
||||
// '1' -> 1
|
||||
function toNative (value) {
|
||||
if (typeof value === 'string') {
|
||||
if (value === ''
|
||||
|| value.trim() !== value
|
||||
|| (value.length > 1 && value[0] === '0')) {
|
||||
if (
|
||||
value === '' ||
|
||||
value.trim() !== value ||
|
||||
(value.length > 1 && value[0] === '0')
|
||||
) {
|
||||
return value
|
||||
} else if (value === 'true' || value === 'false') {
|
||||
return value === 'true'
|
||||
|
Reference in New Issue
Block a user