Poor man's Symbol implementation, not compliant. Uses
window.Symbol
if present
This is not a polyfill, it's only good to be used to generate pseudo-private property keys.
npm install --save poor-mans-symbol
import PoorSymbol from './poor-mans-symbol';
const ಠ = PoorSymbol('my-nice-module');
el[ಠ] = 'Some private stuff';
Copy the content of the file dist/poor-mans-symbol.browser.js
into your code, don't load that file separately, it's too small. Then:
var ಠ = PoorSymbol('my-nice-module');
el[ಠ] = 'Some private stuff';
MIT © Federico Brigante