It's not immediately clear which `path` binding `insteadof` will resolve to
here:
import path from "path";
function dirOp(path) {
with (path) {
if ((insteadof path).dirname(path) === "/") {
// ...
}
}
}
dirOp({ path: "" });
Or even...
import path from "path";
function dirOp(path) {
try {
// ...
} catch (path) {
if ((insteadof path).dirname(path) === "/") {
// ...
}
}
}
dirOp({ path: "" });
If that's not compelling enough, then this might be:
import { dirname } from "path";
function dirOp(path) {
if (dirname(path) === "/") {
// ...
}
}
dirOp({ path: "" });
Rick
On Sat, Jul 11, 2015 at 9:59 AM Bucaran <[email protected]> wrote:
> On Jun 26, 2015, at 9:42 AM, Salvador de la Puente González <
> [email protected]> wrote:
>
>
> And remember you always can use the explicit global object to avoid
> collisions.
>
>
> Indeed. Thanks for mentioning that.
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss