Giter Site home page Giter Site logo

christianmurphy / estree-util-is-identifier-name Goto Github PK

View Code? Open in Web Editor NEW

This project forked from syntax-tree/estree-util-is-identifier-name

0.0 2.0 0.0 36 KB

Check if something can be an ecmascript (javascript) identifier name

License: MIT License

JavaScript 100.00%

estree-util-is-identifier-name's Introduction

estree-util-is-identifier-name

Build Coverage Downloads Size Sponsors Backers Chat

Check if something can be an identifier name.

Install

This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required.

npm:

npm install estree-util-is-identifier-name

Use

import {name, start, cont} from 'estree-util-is-identifier-name'

name('$something69') // => true
name('69') // => false
name('var') // => true (this does not handle keywords)

start(48) // => false (character code for `0`)
cont(48) // => true (character code for `0`)

API

This package exports the following identifiers: name, start, and cont. There is no default export.

name(value)

Checks if the given string is a valid identifier name.

start(code)

Checks if the given character code can start an identifier.

cont(code)

Checks if the given character code can continue an identifier.

Related

License

MIT ยฉ Titus Wormer

estree-util-is-identifier-name's People

Contributors

wooorm avatar remcohaszing avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.