Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@platform/util.value

Package Overview
Dependencies
Maintainers
1
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@platform/util.value - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

8

lib/value/value.is.js

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc