Skip to content

Commit

Permalink
Refactor code-style
Browse files Browse the repository at this point in the history
*   Add more docs to JSDoc
  • Loading branch information
wooorm committed Jan 19, 2023
1 parent a3b6017 commit d38d35d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import {start as startRe, cont as contRe} from './regex.js'
* Checks if the given character code can start an identifier.
*
* @param {number} code
* Character code to check.
* @returns {boolean}
* Whether `code` can start an identifier.
*/
// To do: support astrals.
export function start(code) {
Expand All @@ -14,6 +17,9 @@ export function start(code) {
* Checks if the given character code can continue an identifier.
*
* @param {number} code
* Character code to check.
* @returns {boolean}
* Whether `code` can continue an identifier.
*/
// To do: support astrals.
export function cont(code) {
Expand All @@ -25,6 +31,9 @@ export function cont(code) {
* Checks if the given string is a valid identifier name.
*
* @param {string} name
* Identifier to check.
* @returns {boolean}
* Whether `name` can be an identifier.
*/
export function name(name) {
let index = -1
Expand Down

0 comments on commit d38d35d

Please sign in to comment.