Releases: stampit-org/stampit
Do not use `Array.prototype.includes()` in code
The Array.prototype.includes() was not polifilled/traspiled. But stampit was using it. Thus, failing to work in some cases under node v4 and IE environments.
Composers fixes
The new Composers feature fixes.
- The composers array was not deduplicated. Now it is.
- In case of
stamp.compose()syntax thestampwas never passed to composers. Fixed too.
Republish a malformed package
The v3.1.0 tarball was uploaded to NPM registry somewhat wrongly. This v3.1.1 just fixes the issue.
New feature - composers
"Composers" is an experimental proposal to the Stamp Specification.
Composers are sort-of-a hooks where you can alter composition with your own logic. See this article.
Simplest example:
const Tracked = stampit()
.composers(({composables, stamp}) => { // declaring a composer
console.log(`Composed a stamp "${stamp}" from the following:
"${composable.join()}"`);
});The list of composers is stored in the stamp.compose.configuration.composers array. This means that stamps are still specification compatible.
Fix npm distro size
Previous release accidentally published few unnecessary development files.
Performance fix
Object instance property access performance was 100 times lower than for plain objects. Fixed.
Also, improved IDE support with some additional JSDoc.
Remove .babelrc and package.json-babel
By removing .babelrc file, and the babel property in the package.json we improve compatibility with react-native and other packages which traverse the node_modules for babel stuff.
Instead, we are using buble for transpilation. It's faster, and generates a tiny bit smaller bundle file (1.52KB vs 1.56KB).
v3.0.3
Incorrect `export {compose}`
Stampit was exporting the original pure compose function. Although, by design it should have exported the infected compose (aka stampit).
NPM tarball size decrease
Reduced the NPM distributed tarball from 60KB to 43KB.