bullhorn / chomsky Goto Github PK
View Code? Open in Web Editor NEW[DEPRECATED] Moved into NovoElements (https://github.com/bullhorn/novo-elements)
License: MIT License
[DEPRECATED] Moved into NovoElements (https://github.com/bullhorn/novo-elements)
License: MIT License
My name is Hernan; with a group of colleagues we are conducting a research about unused code present in dependencies of JavaScript projects. We call this functions, UFF (Unused foreign functions). We found that in most projects there exist a great amount of UFF that are being included in the final bundle.
In the case of chomsky (v 1.0.8) our tools detected approximately 1000 unused function in the dependencies (systemjs, when, rxjs, symbol-observable, numbro, moment-timezone, moment). Removing those functions, the size of chomsky bundled could be reduced at least 38% (All tests passed). I’m attaching the reduced version of your project.
bundle(optimized).txt
I’ll be very grateful if you can answer me the following questions:
-Did you were aware of the existence of these unused functions in your projects?
-Do you think that this is a problem?
Thanks in advance.
Cheers,
It would be nice if once-specified dynamic values used in interpolation were cached. Then if the key was re-used with no value added it would recall the first stored value.
In some languages (e.g. German), nouns are inflected based on three characteristics: number, gender, and case. We should expand chomsky to handle all three characteristics. This should also include the inflection of words that depend on the inflected word (e.g. adjectives).
Example phrase:
"for this customer"
Uninflected (and gramatically incorrect) German translation:
"für diese Kunde"
"Für" takes a noun in the accusative case. "Kunden" is the accusative singular form of Kunde (a masculine noun). Also, in this phrase "diese" depends on Kunde and must agree in gender, number, and case (here singular, masculine, accusative).
Inflected, correct translation:
"für diesen Kunden"
The complexity is easiest to summarize via the declension of the adjective:
https://en.wiktionary.org/wiki/diese
Note that in German the plural forms are identical for all genders, but are still inflected based on case.
Return a properly localized list of words when passing in an array of like words. Chomsky would handle the order, the delimiter, and (perhaps optionally) initial and/or final conjunctions.
In English:
[red, blue, green] => red, blue, green
In another language, the comma could be a different character, and there can be different rules for initial, penultimate, and terminal punctuation.
The following don't work when not in the same locale as the currency.
abbrev | full | symbol |
---|---|---|
PLN | Polish Zloty | zł |
CHF | Swiss Franc | CHF |
AED | United Arab Emirates Dirham | AED |
SGD | Singapore Dollar | |
HUF | Hungarian Forint | Ft |
DKK | Danish Krone | kr. |
SEK | Swedish Krona | kr |
NOK | Norwegian Krone | kr |
ZAR | South African Rand | R |
The issue is with then INTL libary only seems to support true currency symbols (ie. single character) from here:
http://www.fileformat.info/info/unicode/category/Sc/list.htm
Spec: http://www.ecma-international.org/ecma-402/1.0/#sec-6.3
We should create an override system for these scenarios to check if the currency code (PLN) is still in the formatted string replace with overrideString in a mapping we maintain.
Override should happen here: https://github.com/bullhorn/chomsky/blob/master/src/lib/formats.ts#L53
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.