Skip to content

Conversation

@bahamas10
Copy link
Contributor

  • remove linestream.js and use lstream in npm
  • remove use of new Function
  • pure javascript dottedLookup function

Performance gains (hard to measure at such low ms times, probably negligible)

https://gist.github.com/bahamas10/3a6516358d86bcef11c5

The real gain is in safety - no evaluation of user supplied data can happen with this method

Tests pass

$ make check test
./tools/jsstyle -o indent=4,doxygen,unparenthesized-return=0,blank-after-start-comment=0,leading-right-paren-ok lib/tabula.js test/basics.test.js test/cases.test.js test/tap4nodeunit.js
Check ok.
./node_modules/.bin/nodeunit test/*.test.js

basics.test.js
✔ exports

cases.test.js
✔ case: array-cell
✔ case: dotted-lookup-sort
✔ case: dotted-lookup
✔ case: no-columns-option
✔ case: obj-columns
✔ case: object-cell
✔ case: simple
✔ case: skip-header
✔ case: sort-simple
✔ manual case: function-cell

OK: 12 assertions (31ms)

- remove linestream.js and use lstream in npm
- remove use of `new Function`
- pure javascript dottedLookup function
@bahamas10 bahamas10 force-pushed the dave.eddy-1440529369 branch from ceea134 to 228ec08 Compare August 25, 2015 19:35
@trentm trentm merged commit 228ec08 into trentm:master Sep 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants