Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inspect-js/has-strict-mode
Does the current JS environment have strict mode? ES5+ should; but let's not assume.
https://github.com/inspect-js/has-strict-mode
ecmascript javascript strict
Last synced: 3 months ago
JSON representation
Does the current JS environment have strict mode? ES5+ should; but let's not assume.
- Host: GitHub
- URL: https://github.com/inspect-js/has-strict-mode
- Owner: inspect-js
- License: mit
- Created: 2019-07-22T05:52:31.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-11-01T21:39:12.000Z (about 2 years ago)
- Last Synced: 2024-10-11T07:52:26.223Z (3 months ago)
- Topics: ecmascript, javascript, strict
- Language: JavaScript
- Homepage:
- Size: 51.8 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# has-strict-mode [![Version Badge][npm-version-svg]][package-url]
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][deps-svg]][deps-url]
[![dev dependency status][dev-deps-svg]][dev-deps-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url][![npm badge][npm-badge-png]][package-url]
Does the current JS environment have strict mode? ES5+ should; but let's not assume.
## Example
```js
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`[package-url]: https://npmjs.org/package/has-strict-mode
[npm-version-svg]: https://versionbadg.es/inspect-js/has-strict-mode.svg
[deps-svg]: https://david-dm.org/inspect-js/has-strict-mode.svg
[deps-url]: https://david-dm.org/inspect-js/has-strict-mode
[dev-deps-svg]: https://david-dm.org/inspect-js/has-strict-mode/dev-status.svg
[dev-deps-url]: https://david-dm.org/inspect-js/has-strict-mode#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/has-strict-mode.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/has-strict-mode.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/has-strict-mode.svg
[downloads-url]: https://npm-stat.com/charts.html?package=has-strict-mode
[codecov-image]: https://codecov.io/gh/inspect-js/has-strict-mode/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/inspect-js/has-strict-mode/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-strict-mode
[actions-url]: https://github.com/inspect-js/has-strict-mode/actions