Socket
Book a DemoInstallSign in
Socket

is-valid-variable

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

is-valid-variable

Check if a token is a valid variable name

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

is-valid-variable

Check if a token is a valid variable name

npm install is-valid-property

Doesn't try to follow the full spec, ie might say false when something should be true, but will never say true when something should be false

Usage

const isValidVariable = require('is-valid-variable')

console.log(isValidVariable('const')) // false
console.log(isValidVariable('constantin')) // true
console.log(isValidVariable('64')) // false
console.log(isValidVariable('x64')) // true

License

MIT

FAQs

Package last updated on 31 May 2023

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