1.0.0 • Published 5 years ago
has-private-fields v1.0.0
has-private-fields 
Determine if the JS environment has private fields (class { #x; }) support.
Example
const assert = require('assert');
const hasPrivateFields = require('has-private-fields');
assert.equal(hasPrivateFields(), true); // if the environment has native class private fields support
const { hasPrivateAccessors, hasPrivateMethods } = hasPrivateFields;
assert.equal(hasPrivateAccessors(), true); // if the environment has native class private accessors support
assert.equal(hasPrivateMethods(), true); // if the environment has native class private methods supportTests
Simply clone the repo, npm install, and run npm test
