Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonwoodring/octal-number-loader
A webpack loader for octal numbers
https://github.com/jonwoodring/octal-number-loader
babel octal strict webpack
Last synced: 6 days ago
JSON representation
A webpack loader for octal numbers
- Host: GitHub
- URL: https://github.com/jonwoodring/octal-number-loader
- Owner: jonwoodring
- License: cc0-1.0
- Created: 2017-02-25T19:42:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-03-03T00:11:58.000Z (over 7 years ago)
- Last Synced: 2024-10-31T18:14:42.977Z (15 days ago)
- Topics: babel, octal, strict, webpack
- Language: JavaScript
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# a webpack loader for octal numbers #
Octal numbers like 00001 will be changed to 0o0001.
This is because strict mode babel does not allow them. See:
https://github.com/lukehoban/es6features#binary-and-octal-literalsIn my webpack config, I only use it on particular files that are troublesome.
```js
{
test: /tar[\\\/].*\.js$/,
loader: 'babel-loader!octal-number-loader'
}
```Notes
=====- It should correctly handle identifiers and floating point numbers now.
---
Use as you see fit, I claim no copyright over this.
![CC0-1.0](https://licensebuttons.net/p/zero/1.0/88x31.png)