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

@chenfengyuan/is-empty-string

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chenfengyuan/is-empty-string

Check if the given value is an empty string.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

is-empty-string

Build Status Coverage Status Downloads Version

Check if the given value is an empty string.

Main

dist/
├── is-empty-string.js        (UMD)
├── is-empty-string.min.js    (UMD, compressed)
├── is-empty-string.common.js (CommonJS, default)
└── is-empty-string.esm.js    (ES Module)

Install

npm install @chenfengyuan/is-empty-string

Usage

Syntax

isEmptyString(value, trim = false);
  • value

    • Type: *
    • The value to check.
  • trim (optional)

    • Type: Boolean
    • Default: false
    • Indicates if remove whitespace from both ends of the value before length checking or not.
  • (return value)

    • Type: Boolean
    • Returns true if the given value is an empty string, else false.

Examples

import isEmptyString from '@chenfengyuan/is-empty-string';

isEmptyString('');
// > true

isEmptyString(' ');
// > false

isEmptyString(' ', true);
// > true

isEmptyString('foo');
// > false

isEmptyString(1);
// > false

License

MIT © Chen Fengyuan

Keywords

FAQs

Package last updated on 23 May 2018

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

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