@rip-lang/api 0.7.5 → 0.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.rip +3 -1
- package/package.json +1 -1
package/api.rip
CHANGED
|
@@ -590,6 +590,8 @@ export read = (keyOrTag = null, tagOrMiss = null, missOrNil = null) ->
|
|
|
590
590
|
return miss?() if typeof miss is 'function'
|
|
591
591
|
throw new Error "Missing required field: #{key}"
|
|
592
592
|
else
|
|
593
|
-
return if typeof miss is 'function'
|
|
593
|
+
return miss?() if typeof miss is 'function'
|
|
594
|
+
return null if miss is '' or not miss? # Empty string or null/undefined → null
|
|
595
|
+
return miss # Return 0, false, etc. as-is
|
|
594
596
|
|
|
595
597
|
v
|