npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

is-0

v1.3.0

Published

Check if parameter is empty.

Readme

is

npm version CI codecov semantic-release: conventionalcommits

NPM

값이 empty인지 확인하는 단순하고 강력한 함수를 제공합니다.

Installation

npm install is-0

먼저 .npmrc 파일을 생성하거나 수정하세요:

@SangHakLee:registry=https://npm.pkg.github.com

그리고 GitHub Personal Access Token으로 인증:

npm login --scope=@SangHakLee --registry=https://npm.pkg.github.com

패키지 설치:

npm install @SangHakLee/is-0

Usage

JavaScript (CommonJS)

const is = require('is-0')

console.log(is.empty(''))        // true
console.log(is.empty([]))        // true
console.log(is.empty({}))        // true
console.log(is.empty(null))      // true
console.log(is.empty(undefined)) // true

console.log(is.empty('hello'))   // false
console.log(is.empty([1, 2, 3])) // false
console.log(is.empty({ a: 1 }))  // false

TypeScript

import * as is from 'is-0'

const value: any = ''
if (is.empty(value)) {
  console.log('Value is empty')
}

API

is.empty(value: any): boolean

주어진 값이 "empty"인지 확인합니다.

Empty로 판단되는 값:

  • 빈 문자열: '', new String(), ``
  • 빈 배열: [], new Array()
  • 빈 객체: {}, new Object()
  • null
  • undefined

Empty가 아닌 값:

is.empty(1)           // false - 숫자
is.empty('string')    // false - 문자열
is.empty([1])         // false - 배열 (요소 있음)
is.empty({a: 1})      // false - 객체 (프로퍼티 있음)
is.empty(true)        // false - boolean
is.empty(false)       // false - boolean
is.empty(new Date())  // false - Date 객체
is.empty(new Map())   // false - Map 객체

특수 케이스:

is.empty(new Proxy({}, {}))  // true - 빈 Proxy는 empty로 판단

더 많은 예제는 ./test/datas/empty.ts를 참고하세요.

is.isEmpty(value: any): boolean

is.empty()의 별칭입니다. 동일하게 동작합니다.

Development

Requirements

  • Node.js ≥ 20.0.0
  • npm ≥ 10.0.0

Contributing

기여를 환영합니다! 자세한 내용은 CONTRIBUTING.md를 참고하세요.

License

MIT © SangHak Lee