Strict mode
a.k.a anal mode. Generally Bublé's transformations most closely resemble Babel's es2015-loose
mode, where there's a difference between es2015-loose
and es2015
. In some cases, people might want the stricter transformation.
A few things spring to mind:
- We'd probably want both a
strict: true
(or maybe something other than 'strict', to avoid conflation with'use strict'
?) and the ability to control individual transformers - Inline directives might be nice (
var chars = [...str]; // buble strict
, or something) to opt in or out just where necessary - Strict mode contains lots of size hazards. Would probably need to implement helpers, which is a pain (since you need a way to dedupe them across many files, and you need to support all kinds of different build set-ups and opinions about modules etc...)