@cfware/symbols

An iterator which generates Symbol's

Usage no npm install needed!

<script type="module">
  import cfwareSymbols from 'https://cdn.skypack.dev/@cfware/symbols';
</script>

README

@cfware/symbols NPM Version

An iterator which generates Symbol's

Usage

import Symbols from '@cfware/symbols';

export [Bar1, Bar2] = Symbols;

export class Foo {
    [Bar1] = 'protected field';
    [Bar2]() {
        return 'protected method';
    }
}

This allows declaration of protected fields. A primary goal is to be terser friendly, the Bar1 field will be safely shortened even when it is used across sources.