Comments (3)
@jejacks0n: you should probably open this issue at mishoo/uglifyjs instead, since this is just how uglifyjs currently behaves.
from uglifier.
UglifyJS actually encodes '\0' as null character (saves one byte?).
Unfortunately, this causes some weird issues with Uglifier. There seems to be two separate bugs: therubyracer seems to use internally nulls as string terminators and yajl-ruby also ignores nulls when decoding JSON.
For example, when using therubyracer as ExecJS runtime (and any JSON gem)
ExecJS.exec("return \"\\0foo\"").length
=> 0
Then again, when using node.js as ExecJS engine and yajl-ruby for MultiJson:
ExecJS.exec("return \"\\0foo\"").length
=> 3
This is a known issue in the yajl-ruby gem, see: brianmario/yajl-ruby#45
When the MultiJson engine is changed to :json_gem
or :ok_json
ExecJS.exec("return \"\0foo\"").length
=> 4
from uglifier.
Null characters are encoded as '\0'. Fixed in 27c6dd1.
from uglifier.
Related Issues (20)
- Example for harmony in readme is very dangerous HOT 4
- inlining dependencies HOT 2
- Jekyll configuration to use ES6
- Different versions between `VERSION` and published HOT 2
- Uglifier::Error: Unexpected token: name (package)
- Uglifier::Error: HOT 6
- Uglifier Cannot Precompile JS Optional Chaining HOT 3
- Uglifier runs into problems with certain combination of modern JS syntax (await, destructuring, Promise.all) HOT 1
- Uglifier complains about field declaration syntax HOT 1
- NoMethodError: undefined method `start_with?' for nil:NilClass HOT 1
- jekyll 3.8.7 | Error: Unexpected token: keyword (const). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true).
- Changing Uglifier.new parameters does nothing if I dont clean manually the assets files first HOT 2
- Documentation for :define => {} ?
- Custom replacements
- Uglifier::Error: - Solution: Switch to terser HOT 15
- Uglifier::Error: Unexpected token: punc (.) HOT 4
- Uglifier error in production mode on RoR 7.0.3.1 with Bootstrap 5.2 HOT 16
- Uglifier assets compiling error HOT 1
- XHTML style script tag within comment breaks parsing
- Update UglifyJS to 3.17.4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uglifier.