Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

is-empty-null

isoloi4ISC1.0.0

defines if string is empy or null (test package)

readme

/// Is empty or null

Simple example for how to publish npm packages for discord channel

code is simple


// Main package function
function isNullOrEmpty(input) {
  // Returns true if the input is either undefined, null, or empty, false otherwise
  return input === undefined || input === null || input === ""
}

// Make the main function available to other packages that require us
module.exports = isNullOrEmpty

and then


`javascript // Change './index' to 'is-null-or-empty' if you use this code outside of this package const isNullOrEmpty = require("./index")

console.log(isNullOrEmpty("")) // true console.log(isNullOrEmpty(null)) // true console.log(isNullOrEmpty(undefined)) // true

console.log(isNullOrEmpty("Hello World")) // false