style update to standard v7

This commit is contained in:
typicode
2016-07-03 18:50:11 +02:00
parent bf45e62b7a
commit 988ddded82
15 changed files with 12 additions and 78 deletions

View File

@ -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'