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

@blocksuite/global

Package Overview
Dependencies
Maintainers
5
Versions
1148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blocksuite/global - npm Package Compare versions

Comparing version 0.5.0-20230303194346-1eb65e7 to 0.5.0-20230304183717-8ea9932

1

dist/utils.d.ts

@@ -10,2 +10,3 @@ import type { BaseBlockModel } from '@blocksuite/store';

export declare function assertExists<T>(val: T | null | undefined, message?: string): asserts val is T;
export declare function assertNotExists<T>(val: T | null | undefined, message?: string): asserts val is null | undefined;
export declare function assertFlavours(model: {

@@ -12,0 +13,0 @@ flavour: string;

@@ -14,2 +14,7 @@ export { DisposableGroup, flattenDisposable } from './utils/disposable.js';

}
export function assertNotExists(val, message = 'val exists') {
if (val !== null && val !== undefined) {
throw new Error(message);
}
}
export function assertFlavours(model, allowed) {

@@ -16,0 +21,0 @@ if (!allowed.includes(model.flavour)) {

2

package.json
{
"name": "@blocksuite/global",
"version": "0.5.0-20230303194346-1eb65e7",
"version": "0.5.0-20230304183717-8ea9932",
"types": "./index.d.ts",

@@ -5,0 +5,0 @@ "type": "module",

@@ -27,2 +27,11 @@ import type { BaseBlockModel } from '@blocksuite/store';

export function assertNotExists<T>(
val: T | null | undefined,
message = 'val exists'
): asserts val is null | undefined {
if (val !== null && val !== undefined) {
throw new Error(message);
}
}
export function assertFlavours(model: { flavour: string }, allowed: string[]) {

@@ -29,0 +38,0 @@ if (!allowed.includes(model.flavour)) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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