New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@globalbrain/sefirot

Package Overview
Dependencies
Maintainers
1
Versions
284
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@globalbrain/sefirot - npm Package Compare versions

Comparing version 0.42.0 to 0.43.0

6

CHANGELOG.md

@@ -0,1 +1,7 @@

# [0.43.0](https://github.com/globalbrain/sefirot/compare/v0.42.0...v0.43.0) (2021-03-01)
### Features
* add ability to take callback in `computedIfOnly` helper function ([82cb14d](https://github.com/globalbrain/sefirot/commit/82cb14df6c2225246345b794b7f22b3724c01300))
# [0.42.0](https://github.com/globalbrain/sefirot/compare/v0.41.0...v0.42.0) (2021-02-26)

@@ -2,0 +8,0 @@

20

lib/composables/Utils.ts

@@ -5,4 +5,12 @@ import { Ref, ComputedRef, UnwrapRef, ref, computed, watch, isRef } from '@vue/composition-api'

export function get<T>(refish: Refish<T>): T {
return isRef(refish) ? refish.value : refish
export function get<T>(refish: Refish<T> | (() => T)): T {
if (isRef(refish)) {
return refish.value
}
if (refish instanceof Function) {
return refish()
}
return refish
}

@@ -23,3 +31,3 @@

export function computedIfOnly<T, R, E>(
refish: Ref<T | null> | ComputedRef<T | null>,
refish: Ref<T | null> | ComputedRef<T | null> | (() => T | null),
callback: (value: T) => R,

@@ -30,4 +38,6 @@ empty: E

if (refish.value) {
value.value = callback(refish.value) as UnwrapRef<R>
const refValue = get(refish)
if (refValue) {
value.value = callback(refValue) as UnwrapRef<R>
}

@@ -34,0 +44,0 @@

{
"name": "@globalbrain/sefirot",
"version": "0.42.0",
"version": "0.43.0",
"description": "Vue Components for Global Brain Design System.",

@@ -5,0 +5,0 @@ "files": [

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