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

@quenty/brio

Package Overview
Dependencies
Maintainers
1
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@quenty/brio

Brios wrap an object and either are alive or dead

  • 3.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
167
decreased by-93.23%
Maintainers
1
Weekly downloads
 
Created
Source

Brio

Documentation Discord Build and release status

Brios wrap a value and provide the following constraints

Installation

npm install @quenty/brio --save
  • Can be in 2 states, dead or alive
  • While alive, can retrieve values
  • While dead, retrieving values is forbidden
  • Died will fire once upon death

Brios encapsulate the "lifetime" of a valid resource. Unlike a maid, they

  • Can only die once
  • Have less memory leaks
  • Cannot be reentered

Calling :Destroy() or :Kill() after death does nothing. Brios cannot be resurrected.

Useful for downstream events where you want to emit a resource. Typically brios should be killed when their source is killed.

Brios are intended to be merged with downstream brios so create a chain of reliable resources.

Anything may "kill" a brio by calling :Destroy() or :Kill().

API Surface

Brio.isBrio(value)

Brio.new(...) -- Wrap

Brio:GetDiedSignal()

Brio:IsDead()

Brio:ErrorIfDead()

Brio:ToMaid()

Brio:GetValue()

Brio:Destroy()

Keywords

FAQs

Package last updated on 18 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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