@platform/util.value
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -78,11 +78,13 @@ "use strict"; | ||
function isPromise(value) { | ||
return common_1.R.is(Object, value) && common_1.R.is(Function, value.then); | ||
return value | ||
? typeof value === 'object' && typeof value.then === 'function' | ||
: false; | ||
} | ||
exports.isPromise = isPromise; | ||
function isJson(value) { | ||
if (!common_1.R.is(String, value)) { | ||
if (typeof value !== 'string') { | ||
return false; | ||
} | ||
var text = value.trim(); | ||
return common_1.R.startsWith('{', text) || common_1.R.startsWith('[', text); | ||
return text.startsWith('{') || text.startsWith('['); | ||
} | ||
@@ -89,0 +91,0 @@ exports.isJson = isJson; |
{ | ||
"name": "@platform/util.value", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "Helpers for working with, transforming, and formatting values.", | ||
@@ -17,3 +17,3 @@ "main": "lib/index", | ||
"@platform/libs": "0.0.3", | ||
"@platform/util.is": "0.0.9", | ||
"@platform/util.is": "0.0.10", | ||
"@types/semver": "^5.5.0", | ||
@@ -20,0 +20,0 @@ "cuid": "2.1.6", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
105329
2821
+ Added@platform/util.is@0.0.10(transitive)
- Removed@platform/util.is@0.0.9(transitive)
Updated@platform/util.is@0.0.10