Socket
Socket
Sign inDemoInstall

@visulima/inspector

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@visulima/inspector - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

6

CHANGELOG.md

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

## @visulima/inspector [1.0.2](https://github.com/visulima/visulima/compare/@visulima/inspector@1.0.1...@visulima/inspector@1.0.2) (2024-06-14)
### Bug Fixes
* **inspector:** exported missing option type ([8e27954](https://github.com/visulima/visulima/commit/8e2795435e51f5e7f27ebe936bc6484b7f713744))
## @visulima/inspector [1.0.1](https://github.com/visulima/visulima/compare/@visulima/inspector@1.0.0...@visulima/inspector@1.0.1) (2024-06-13)

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

59

dist/index.d.ts

@@ -0,1 +1,56 @@

/**
Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
@category Type
*/
type Primitive =
| null
| undefined
| string
| number
| boolean
| symbol
| bigint;
declare global {
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
interface SymbolConstructor {
readonly observable: symbol;
}
}
/**
Allows creating a union type by combining primitive types and literal types without sacrificing auto-completion in IDEs for the literal type part of the union.
Currently, when a union type of a primitive type is combined with literal types, TypeScript loses all information about the combined literals. Thus, when such type is used in an IDE with autocompletion, no suggestions are made for the declared literals.
This type is a workaround for [Microsoft/TypeScript#29729](https://github.com/Microsoft/TypeScript/issues/29729). It will be removed as soon as it's not needed anymore.
@example
```
import type {LiteralUnion} from 'type-fest';
// Before
type Pet = 'dog' | 'cat' | string;
const pet: Pet = '';
// Start typing in your TypeScript-enabled IDE.
// You **will not** get auto-completion for `dog` and `cat` literals.
// After
type Pet2 = LiteralUnion<'dog' | 'cat', string>;
const pet: Pet2 = '';
// You **will** get auto-completion for `dog` and `cat` literals.
```
@category Type
*/
type LiteralUnion<
LiteralType,
BaseType extends Primitive,
> = LiteralType | (BaseType & Record<never, never>);
type Inspect = (input: unknown, options: Options) => string;

@@ -12,3 +67,3 @@ interface Options {

showProxy: boolean;
stylize: <S extends string>(value: S, styleType: string | "bigint" | "boolean" | "date" | "null" | "number" | "regexp" | "special" | "string" | "symbol" | "undefined") => string;
stylize: <S extends string>(value: S, styleType: LiteralUnion<"bigint" | "boolean" | "date" | "null" | "number" | "regexp" | "special" | "string" | "symbol" | "undefined", string>) => string;
truncate: number;

@@ -21,2 +76,2 @@ }

export { inspect, registerConstructor, registerStringTag };
export { type Options, inspect, registerConstructor, registerStringTag };

@@ -36,1 +36,18 @@ MIT License

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
<!-- DEPENDENCIES -->
<!-- DEPENDENCIES -->
<!-- TYPE_DEPENDENCIES -->
# Licenses of bundled types
The published @visulima/inspector artifact additionally contains code with the following licenses:
(MIT OR CC0-1.0)
# Bundled types:
## type-fest
License: (MIT OR CC0-1.0)
By: Sindre Sorhus
Repository: sindresorhus/type-fest
<!-- TYPE_DEPENDENCIES -->

3

package.json
{
"name": "@visulima/inspector",
"version": "1.0.1",
"version": "1.0.2",
"description": "Inspect utility for Node.js and Browsers.",

@@ -94,2 +94,3 @@ "keywords": [

"semantic-release": "^24.0.0",
"type-fest": "^4.20.0",
"typescript": "^5.4.5",

@@ -96,0 +97,0 @@ "typescript-coverage-report": "^1.0.0",

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

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