npm package “x” requiring itself in its own codebase using require(‘x’)
I was working with froala-editor package and i saw a plugin within the package file requiring the froala-editor itself like this: require(‘froala-editor’)
Here is link to that package: https://github.com/froala/wysiwyg-editor/blob/master/js/plugins/align.min.js