Socket
Book a DemoInstallSign in
Socket

jtruthy

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jtruthy

typescript-typed Boolean()

latest
npmnpm
Version
0.0.7
Version published
Maintainers
1
Created
Source

jtruthy: typescript-typed Boolean() function

Install

Install via npm package:

yarn add jtruthy

Usage

import truthy from 'jtruthy'
// or
const truthy = require('jtruthy')

const arr = [1, 2, false && 3] as const
const a = arr.filter(truthy) // type: (1 | 2)[]
const b = arr.filter(Boolean) // type: (false | 1 | 2)[]

FAQs

Package last updated on 24 Jul 2023

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