inspect-js / has-strict-mode

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

has-strict-mode Version Badge

github actions coverage 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

About

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

License:MIT License


Languages

Language:JavaScript 100.0%