Skip to content

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

License

Notifications You must be signed in to change notification settings

inspect-js/has-strict-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Feb 12, 2025
baf8100 · Feb 12, 2025

History

45 Commits
Feb 12, 2025
Jul 22, 2019
Jul 22, 2019
Nov 1, 2022
Nov 16, 2019
May 2, 2021
Feb 12, 2025
Jul 22, 2019
Oct 14, 2021
Feb 12, 2025
Feb 12, 2025
Feb 12, 2025
Feb 12, 2025

Repository files navigation

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