New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-preset-njs

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-preset-njs

A Babel preset for njs - NGINX JavaScript.

  • 0.7.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

A Babel preset for transforming JavaScript code with modern language features into code compatible with njs (NGINX JavaScript). This preset includes support for all the ECMAScript features up to ES2021 — see Plugins for a complete list.

TIP: Take a look at njs-typescript-starter for a complete starter template for developing njs scripts for NGINX server in TypeScript (including integration tests).

Installation

# using npm:
npm install --save-dev babel-preset-njs
# or using yarn:
yarn add --dev babel-preset-njs

Compatibility Matrix

preset-njsnjsBabel
0.1.0 – 0.2.1≥ 0.5.07
0.7.0≥ 0.7.07

Usage

{
  "presets": ["babel-preset-njs"]
}

Via CLI

babel --presets babel-preset-njs script.js

Via Node API

require('@babel/core').transform('code', {
  presets: [require('babel-preset-njs')],
})

Plugins

The list of included Babel plugins is available here.

References

License

This project is licensed under MIT License.

Keywords

FAQs

Package last updated on 19 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc