🚀. Socket Launch Week Day 2:Introducing Manifest Alerts.Learn more
Sign In

@samual/lib

Package Overview
Dependencies
Maintainers
1
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@samual/lib - npm Package Compare versions

Comparing version
0.13.1-607e4ec
to
0.13.1-964d4e5
+1
capitalize.d.ts
export declare const capitalize: (text: string) => string;
const capitalize = text => text && text[0].toUpperCase() + text.slice(1)
export { capitalize }
+8
-0

@@ -34,1 +34,9 @@ export type Key = keyof any;

export type UnionToIntersection<T> = (T extends any ? (_: T) => void : never) extends ((_: infer I) => void) ? I : never;
/**
* @example
* type CheckedString = Brand<string, { readonly CheckedString: unique symbol }[`CheckedString`]>
* // ^? type CheckedString = string & { [CheckedString]: true }
*/
export type Brand<T, TBrand extends symbol> = T & {
[K in TBrand]: true;
};
+1
-1
{
"name": "@samual/lib",
"version": "0.13.1-607e4ec",
"version": "0.13.1-964d4e5",
"repository": "github:samualtnorman/lib",

@@ -5,0 +5,0 @@ "author": "Samual Norman <me@samual.uk> (https://samual.uk/)",

const { port1, port2 } = new MessageChannel(),
tasks = []
port2.addEventListener("message", () => {
port2.onmessage = () => {
for (const task of tasks.splice(0)) task()
})
}
function queueTask(callback) {

@@ -7,0 +7,0 @@ tasks.length || port1.postMessage(void 0)

@@ -1,4 +0,6 @@

export declare const writeFilePersistent: (path: string, data: string | NodeJS.ArrayBufferView | Iterable<string | NodeJS.ArrayBufferView> | AsyncIterable<string | NodeJS.ArrayBufferView> | import("stream").Stream, options?: BufferEncoding | (import("fs").ObjectEncodingOptions & {
import { writeFile } from "fs/promises";
import type { Slice1 } from ".";
export declare const writeFilePersistent: (path: string, data: string | NodeJS.ArrayBufferView<ArrayBufferLike> | Iterable<string | NodeJS.ArrayBufferView<ArrayBufferLike>> | AsyncIterable<string | NodeJS.ArrayBufferView<ArrayBufferLike>> | import("stream").Stream, options?: BufferEncoding | (import("fs").ObjectEncodingOptions & {
mode?: import("fs").Mode | undefined;
flag?: import("fs").OpenMode | undefined;
} & import("events").Abortable) | null | undefined) => Promise<void>;