has-strict-mode

v1.0.1
Does the current JS environment have strict mode? ES5+ should; but let's not assume.
strict mode strict mode javascript es3 es5

has-strict-mode Version Badge

dependency status dev dependency status License Downloads

npm badge

Does the current JS environment have strict mode? ES5+ should; but let's not assume.

Example

var hasStrictMode = require('has-strict-mode');
var assert = require('assert');

assert.equal(hasStrictMode(), true); // will be `false` in IE 6-8

Tests

Simply clone the repo, npm install, and run npm test

npm i has-strict-mode

Metadata

  • MIT
  • Whatever
  • Jordan Harband
  • released 12/15/2020

Downloads

Maintainers