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

typescanner

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescanner - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

4

package.json
{
"name": "typescanner",
"version": "0.3.0",
"description": "A simple library for implementing type guards in TypeScript.",
"version": "0.3.1",
"description": "A simple library for implementing type guard in TypeScript.",
"author": "yona3",

@@ -6,0 +6,0 @@ "repository": {

@@ -154,7 +154,7 @@ # typescanner

// success
const data = scan(foo, isFoo);
const data = scan(foo as unknown, isFoo);
data.a // OK
// Error!
const data = scan(bar, isFoo); // Error: type assertion is failed.
const data = scan(bar as unknown, isFoo); // Error: value.key does not meet the condition.
```

@@ -184,2 +184,6 @@

// isObject
isObject(value) // (value: unknown) => value is { [P in keyof T]?: unknown }
// isArray

@@ -186,0 +190,0 @@

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