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

righto

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

righto - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

10

index.js

@@ -13,3 +13,3 @@ var abbott = require('abbott');

function isResolveable(x){
function isResolvable(x){
return isRighto(x) || isThenable(x);

@@ -136,3 +136,3 @@ }

}
if(isResolveable(next.value)){
if(isResolvable(next.value)){
righto.sync(function(value){

@@ -379,3 +379,3 @@ lastValue = value;

if(!isResolveable(value) && typeof value === 'function'){
if(!isResolvable(value) && typeof value === 'function'){
value = value.apply(null, slice(arguments, 1));

@@ -453,3 +453,3 @@ }

righto.surely = function(task){
if(!isResolveable(task)){
if(!isResolvable(task)){
task = righto.apply(null, arguments);

@@ -479,3 +479,3 @@ }

righto.isThenable = isThenable;
righto.isResolveable = isResolveable;
righto.isResolvable = isResolvable;

@@ -482,0 +482,0 @@ righto.proxy = function(){

{
"name": "righto",
"version": "2.2.0",
"version": "2.2.1",
"main": "index.js",

@@ -5,0 +5,0 @@ "directories": {

@@ -287,5 +287,5 @@ # Righto

## Value (passing resolveables as unresolved arguments)
## Value (passing resolvables as unresolved arguments)
Sometimes it may be required to pass a resolveable (a righto, or promise) without as an argument,
Sometimes it may be required to pass a resolvable (a righto, or promise) without as an argument,
rather than passing the resolved value of the resolvable. you can do this using `righto.value(resolvable)`

@@ -522,5 +522,5 @@

## isRighto, isThenable, isResolveable
## isRighto, isThenable, isResolvable
Use these methods to check if something is a righto, a thenable, or resolveable (either righto or thenable);
Use these methods to check if something is a righto, a thenable, or resolvable (either righto or thenable);

@@ -541,4 +541,4 @@ ```

righto.isThenable(promiseB); -> true
righto.isResolveable(rigthoA); -> true
righto.isResolveable(promiseB); -> true
righto.isResolvable(rigthoA); -> true
righto.isResolvable(promiseB); -> true

@@ -545,0 +545,0 @@ ```

@@ -1220,8 +1220,8 @@ var test = require('tape'),

t.ok(righto.isThenable(promiseB), 'promiseB is thenable');
t.ok(righto.isResolveable(rigthoA), 'rigthoA is resolveable');
t.ok(righto.isResolveable(promiseB), 'promiseB is resolveable');
t.ok(righto.isResolvable(rigthoA), 'rigthoA is resolvable');
t.ok(righto.isResolvable(promiseB), 'promiseB is resolvable');
t.notOk(righto.isRighto(null), 'null is not a righto');
t.notOk(righto.isThenable(null), 'null is not a thenable');
t.notOk(righto.isResolveable(null), 'null is not a resolveable');
t.notOk(righto.isResolvable(null), 'null is not a resolvable');
});
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