Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

regex-jinja-specific

codsen393MIT4.0.9TypeScript support: included

Regular expression for detecting Python-specific Jinja code

code, detect, expression, identify, is, jinja, python, regex, regexp, regular, source, tell

readme

regex-jinja-specific

Regular expression for detecting Python-specific Jinja code

page on codsen.com page on npm page on github Downloads per month changelog MIT Licence

Install

This package is pure ESM. If you're not ready yet, install an older version of this program, 2.1.0 (npm i regex-jinja-specific@2.1.0).

npm i regex-jinja-specific

Quick Take

import { strict as assert } from "assert";

import { isJinjaSpecific } from "regex-jinja-specific";

assert.equal(
  isJinjaSpecific().test("<div>{{ '%.2f'|format(3.1415926) }}</div>"),
  true,
);

// in case of ambiguous, Nunjucks-or-Jinja code
assert.equal(isJinjaSpecific().test("<div>{{ value }}</div>"), false);

Documentation

Please visit codsen.com for a full description of the API.

Contributing

To report bugs or request features or assistance, raise an issue on GitHub.

Licence

MIT License.

Copyright © 2010-2025 Roy Revelt and other contributors.

ok codsen star

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

4.0.0 (2022-12-01)

BREAKING CHANGES

  • Minimum supported Node version is v14.18; we're dropping v12 support

3.1.0 (2022-08-12)

Features

3.0.0 (2021-09-09)

Features

BREAKING CHANGES

  • programs now are in ES Modules and won't work with Common JS require()

2.1.0 (2021-05-24)

Features

  • config file based major bump blacklisting (e15f9bb)

2.0.15 (2021-04-11)

Reverts

  • Revert "chore: setup refresh" (23cf206)

2.0.1 (2021-01-28)

Fixed

  • add testStats to npmignore (f3c84e9)

2.0.0 (2021-01-23)

Features

  • rewrite in TS and start using named exports (0764be7)

BREAKING CHANGES

  • previously: import isJinjaSpecific from ... - now import { isJinjaSpecific } from ...

1.0.1 (2020-12-09)