Socket
Socket
Sign inDemoInstall

babel-plugin-transform-strict-mode

Package Overview
Dependencies
7
Maintainers
6
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-strict-mode

This plugin places a 'use strict'; directive at the top of all files to enable strict mode


Version published
Maintainers
6
Weekly downloads
1,758,886
decreased by-7.08%

Weekly downloads

Readme

Source

babel-plugin-transform-strict-mode

This plugin places a "use strict"; directive at the top of all files to enable strict mode.

This plugin may be enabled via babel-plugin-transform-es2015-modules-commonjs. If you wish to disable it you can either turn strict off or pass strictMode: false as an option to the commonjs transform.

Example

In

foo();

Out

"use strict";

foo();

Installation

npm install --save-dev babel-plugin-transform-strict-mode

Usage

.babelrc

Without options:

{
  "plugins": ["transform-strict-mode"]
}

With options:

{
  "plugins": [
    ["transform-strict-mode", {
      "strict": true
    }]
  ]
}

Via CLI

babel --plugins transform-strict-mode script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-strict-mode"]
});

Keywords

FAQs

Last updated on 07 Apr 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc