mirror of
https://github.com/typicode/json-server.git
synced 2025-07-28 12:43:18 +08:00
First commit
This commit is contained in:
11
utils/utils.js
Normal file
11
utils/utils.js
Normal file
@ -0,0 +1,11 @@
|
||||
function toNative(value) {
|
||||
if (value === 'true' || value === 'false') {
|
||||
return value === 'true';
|
||||
} else if (!isNaN(+value)) {
|
||||
return +value;
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
exports.toNative = toNative;
|
Reference in New Issue
Block a user