Socket
Socket
Sign inDemoInstall

@alt-javascript/lang

Package Overview
Dependencies
4
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @alt-javascript/lang

Language feature detection utilities for ECMAScript 6 and beyond.


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Language feature detection utilities for ECMAScript 6 and beyond.

NPM
Language Badge Package Badge
release notes

Introduction

Language feature detection utilities for ECMAScript 6 and beyond, currently bundling the es-feature-detection and feature-detect-es6 npm packages.

Usage

The module can be used directly in the browser, as an IIFE (Immediately Invoked Function Expression), using the global variable lang as follows:

   <script src="https://cdn.jsdelivr.net/npm/@alt-javascript/lang/dist/alt-javascript-lang-iife.js"></script>

   <script>
       if (!lang.allOk(lang.es2020)){
           console.error('We\'re sorry but the site requires JavaScript 11 (ECMAScript 2020). Please upgrade your browser to continue.')
           document.getElementById("require_es2020").style.display = "block"
       }
   </script>

License

May be freely distributed under the MIT license.

Copyright (c) 2021-2022 Craig Parravicini

Keywords

FAQs

Last updated on 18 Mar 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc