Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@stdlib/assert-has-symbol-support
Advanced tools
@stdlib/assert-has-symbol-support is a package that allows you to check if the runtime environment supports ES6 symbols. This can be useful for ensuring compatibility and feature detection in JavaScript applications.
Check Symbol Support
This feature allows you to check if the current environment supports ES6 symbols. The function returns a boolean value indicating the presence or absence of symbol support.
const hasSymbolSupport = require('@stdlib/assert-has-symbol-support');
if (hasSymbolSupport()) {
console.log('Symbols are supported.');
} else {
console.log('Symbols are not supported.');
}
The 'has-symbols' package checks for native Symbol support in the runtime environment. It provides similar functionality to @stdlib/assert-has-symbol-support by returning a boolean value indicating whether symbols are supported.
The 'is-symbol' package checks if a given value is a symbol. While it does not directly check for symbol support in the environment, it can be used in conjunction with other packages to achieve similar goals.
The 'core-js' package is a comprehensive polyfill library that includes support for ES6 symbols among many other features. It can be used to ensure compatibility across different environments, but it is more heavyweight compared to @stdlib/assert-has-symbol-support.
We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.
The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.
When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.
To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!
Detect native
Symbol
support.
npm install @stdlib/assert-has-symbol-support
var hasSymbolSupport = require( '@stdlib/assert-has-symbol-support' );
Detects if a runtime environment supports ES2015 Symbol
.
var bool = hasSymbolSupport();
// returns <boolean>
var hasSymbolSupport = require( '@stdlib/assert-has-symbol-support' );
var bool = hasSymbolSupport();
if ( bool ) {
console.log( 'Environment has Symbol support.' );
} else {
console.log( 'Environment lacks Symbol support.' );
}
@stdlib/assert-has-symbol-support-cli
: CLI package for use as a command-line utility.@stdlib/assert-has-iterator-symbol-support
: detect native Symbol.iterator support.This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
See LICENSE.
Copyright © 2016-2024. The Stdlib Authors.
0.2.2 (2024-07-27)
No changes reported for this release.
</section> <!-- /.release --> <section class="release" id="v0.2.1">FAQs
Detect native Symbol support.
The npm package @stdlib/assert-has-symbol-support receives a total of 362,024 weekly downloads. As such, @stdlib/assert-has-symbol-support popularity was classified as popular.
We found that @stdlib/assert-has-symbol-support demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.