Script Util

This is Script Util methods documents.

Index

isNullOrUndefined

Check the parameter if that is null or undefined.

Signature

  • parameter subject: any
  • returns boolean

Sample


                        const scriptUtil = require("script-util");
                        // return true
                        if(scriptUtil.isNullOrUndefined(null)) { // processing }
                    

isJson

Return true if the string is formatted with JSON.

Signature

appendStdOut

Return the string for the standard output.

Signature

isDateFormat

Return true if the format of the parameter is date.

Signature

formatYMDWith

Reshape string of date for designated format.
2nd paramter, symbol is delimiter of year, month and date. The delimiter is valid only for / or -.

Signature

hasItems

Return true if an array has more than one element.

Signature

hasNoNull

Return true if an array has no null elements.

Signature