Home Manual Reference Source Test
import InitOptionsValidator from 'atscm/src/init/OptionsValidator.js'
public class | source

InitOptionsValidator

A static class containing validators for the options used when running "atscm init".

Test:

Static Method Summary

Static Public Methods
public static

name(value: string): boolean | string

Validates a project name to be a valid npm package name.

Static Public Methods

public static name(value: string): boolean | string source

Validates a project name to be a valid npm package name.

Params:

NameTypeAttributeDescription
value string

The name to validate.

Return:

boolean | string

Returns true if value is a valid npm package name, or an error message otherwise.

Test: