# Proposal: `except` clause in ModuleItem
Inspired by [Haskell’s import statement](https://wiki.haskell.org/Import
<https://wiki.haskell.org/Import>)
## Concept Introduction
Let’s say we have module A:
```js
// A.js
export const zero = 0;
export const one = 1;
export const two = 2;
export const three = 3;
export const four = 4;
// …
export const ten = 10;
```
A has so many exported values.
Now Let’s say we want to re-export numbers between 0 to 9 in module B.
```js
// B.js
export { zero, one, two, three, four, five, six, seven, eight, nine } from
‘./A.js’;
```
Hmmm, This is too long to see, isn’t it?
How can we reduce this long, long export declaration?
“Exporting numbers between 0 to 9 in module B” is same statement as “Exporting
everything except ten from module B”.
So, what if we can rewrite export declaration above like this?:
```js
//B.js
export * except { ten } from ‘./A.js’;
```
This would be not only simpler way but also shorter way.
## Uses cases
When dealing with module that has too many exports to explicitly specify.
I.e when using Util libraries or functional programming libraries like ramda,
lodash, fp-ts and etc.
## Non-Formal shapes
```
Import * except { elements… } from ‘module’;
Export * except { elements… } from ‘module’;
```
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss