1.0.1 • Published 8 years ago
@typeforce/has-symbol v1.0.1
has-symbol
Determine if the current execution environment supports ES6 Symbols.
Behaviour is undefined when the environment is using a Symbol polyfill.
Usage
npm install @typeforce/has-symbol --save # Install package via NPM import { expect } from "chai";
import hasSymbol from "@typeforce/has-symbol";
expect(hasSymbol()).to.be.a("boolean");This package contains TypeScript type declarations.
Content Delivery Network (CDN)
This package can be imported via unpkg as demonstrated below.
<script src="https://unpkg.com/@typeforce/has-symbol/dist/index.min.js"></script>
<script type="application/javascript">
if (hasSymbol()) {
// `Symbol`s are supported!
}
</script>Build & Test
When building the project, a folder named dist/ will be created if it does not
already exist, where the compiled code will be outputted to. Type declaration
files will also be generated and outputted to the dist/ folder.
A minified Javascript version of the entire project will be generated and
outputted to dist/index.min.js.
npm install # Installs dependencies.
npm run build # Build the project.This package uses Gulp for building, and Chai and Mocha for testing.
npm test # Run tests.License
Refer to the LICENSE file for license information.