# @types/is-expression

> TypeScript definitions for is-expression

Latest version **4.0.0** (published 2023-12-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/is-expression
pnpm add @types/is-expression
yarn add @types/is-expression
bun add @types/is-expression
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2023-12-01 |
| First published | 2023-12-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51439 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/is-expression
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/is-expression
- npm.io page: https://npm.io/package/@types/is-expression

## Dependencies (1)

- [acorn](https://npm.io/package/acorn.md) 7.1.1

## Recent versions

- 4.0.0 (latest) — 2023-12-01

## README

# Installation
> `npm install --save @types/is-expression`

# Summary
This package contains type definitions for is-expression (https://github.com/pugjs/is-expression#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/is-expression.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/is-expression/index.d.ts)
````ts
import acorn = require("acorn");

type Options = acorn.Options & {
    /**
     * Throw an error if the string is not an expression.
     * The error can be an Acorn error, with location information in `err.loc` and `err.pos`. Defaults to `false`.
     */
    throw: boolean;
    /**
     * Use strict mode when trying to parse the string. Defaults to `false`.
     * Even if this option is `false`, if you have provided `options.sourceType === 'module'`
     * which imples strict mode under ES2015, strict mode will be used.
     */
    strict: boolean;
    /**
     * When `true`, allows line comments in the expression. Defaults to `false` for safety.
     */
    lineComment: boolean;
};

/**
 * Validates a string as a JavaScript expression.
 */
declare function isExpression(src: string, options?: Partial<Options>): boolean;

export = isExpression;

````

### Additional Details
 * Last updated: Fri, 01 Dec 2023 22:07:07 GMT
 * Dependencies: [acorn](https://npmjs.com/package/acorn)

# Credits
These definitions were written by [Tristan F.](https://github.com/LeoDog896).

---
_Source: https://npm.io/package/@types/is-expression · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
