babel-plugin-transform-strict-mode
This plugin places a 'use strict'; directive at the top of all files to enable strict mode
Last updated 3 years ago by hzoo .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install babel-plugin-transform-strict-mode 
SYNC missed versions from official npm registry.

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

Via .babelrc (Recommended)

.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"]
});

Current Tags

  • 6.24.1                                ...           latest (3 years ago)
  • 7.0.0-beta.3                                ...           next (3 years ago)

39 Versions

  • 7.0.0-beta.3                                ...           3 years ago
  • 7.0.0-beta.2                                ...           3 years ago
  • 7.0.0-beta.1                                ...           3 years ago
  • 7.0.0-beta.0                                ...           3 years ago
  • 7.0.0-alpha.20                                ...           3 years ago
  • 7.0.0-alpha.19                                ...           3 years ago
  • 7.0.0-alpha.18                                ...           3 years ago
  • 7.0.0-alpha.17                                ...           3 years ago
  • 7.0.0-alpha.16                                ...           3 years ago
  • 7.0.0-alpha.15                                ...           3 years ago
  • 7.0.0-alpha.14                                ...           3 years ago
  • 7.0.0-alpha.12                                ...           3 years ago
  • 7.0.0-alpha.11                                ...           3 years ago
  • 7.0.0-alpha.10                                ...           3 years ago
  • 7.0.0-alpha.9                                ...           3 years ago
  • 7.0.0-alpha.8                                ...           3 years ago
  • 6.24.1                                ...           3 years ago
  • 7.0.0-alpha.7                                ...           3 years ago
  • 7.0.0-alpha.3                                ...           3 years ago
  • 7.0.0-alpha.1                                ...           3 years ago
  • 6.22.0                                ...           3 years ago
  • 6.18.0                                ...           4 years ago
  • 6.11.3                                ...           4 years ago
  • 6.8.0                                ...           4 years ago
  • 6.6.5                                ...           4 years ago
  • 6.6.4                                ...           4 years ago
  • 6.5.2                                ...           4 years ago
  • 6.5.0-1                                ...           4 years ago
  • 6.5.0                                ...           4 years ago
  • 6.3.13                                ...           5 years ago
  • 6.2.4                                ...           5 years ago
  • 6.2.0                                ...           5 years ago
  • 6.1.18                                ...           5 years ago
  • 6.1.17                                ...           5 years ago
  • 6.1.4                                ...           5 years ago
  • 6.1.2                                ...           5 years ago
  • 6.0.15                                ...           5 years ago
  • 6.0.14                                ...           5 years ago
  • 6.0.2                                ...           5 years ago
Downloads
Today 1,326
This Week 49,936
This Month 91,994
Last Day 12,215
Last Week 66,466
Last Month 282,583
Dependencies (2)
Dev Dependencies (1)
Dependents (207)

Copyright 2014 - 2016 © taobao.org |