An open API service indexing awesome lists of open source software.

https://github.com/zardoy/const-name

Infer variable name from call expression or singular form from JS expression
https://github.com/zardoy/const-name

npm-package

Last synced: about 1 year ago
JSON representation

Infer variable name from call expression or singular form from JS expression

Awesome Lists containing this project

README

          

# Const Name

Infer variable name from call or singular form from JS expression.

Main exports: `getVariableNameFromCallExpresion()`, `getSingularFormFromExpression()`.

Look at [tests](./src/index.spec.ts) for use cases.

You can integrate it with your extension or code generator.

[API (types)](https://paka.dev/npm/const-name).