Skip to content

Commit

Permalink
feat: Break up the argument and constant handlers into reusable code
Browse files Browse the repository at this point in the history
  • Loading branch information
robertleeplummerjr committed May 8, 2019
1 parent d6757ab commit 20ee1f7
Show file tree
Hide file tree
Showing 84 changed files with 48,423 additions and 46,777 deletions.
18,693 changes: 9,490 additions & 9,203 deletions bin/gpu-browser-core.js

Large diffs are not rendered by default.

18,697 changes: 9,492 additions & 9,205 deletions bin/gpu-browser-core.min.js

Large diffs are not rendered by default.

18,701 changes: 9,494 additions & 9,207 deletions bin/gpu-browser.js

Large diffs are not rendered by default.

18,705 changes: 9,496 additions & 9,209 deletions bin/gpu-browser.min.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ gulp.task('default', gulp.series('minify','bsync'));
gulp.task('beautify', function() {
return gulp.src(['src/**/*.js'])
.pipe(jsprettify({
indent_size: 3,
indent_size: 2,
indent_char: ' ',
indent_with_tabs: true
indent_with_tabs: false,
eol: '\n',
brace_style: 'preserve-inline'
}))
.pipe(gulp.dest('src'));
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gpu.js",
"version": "2.0.0-rc.13",
"version": "2.0.0-rc.14",
"description": "GPU Accelerated JavaScript",
"engines": {
"node": ">=10.0.0"
Expand Down
12 changes: 5 additions & 7 deletions src/alias.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const {
utils
} = require('./utils');
const { utils } = require('./utils');

/**
*
Expand All @@ -9,12 +7,12 @@ const {
* @returns {Function}
*/
function alias(name, source) {
const fnString = source.toString();
return new Function(`return function ${ name } (${ utils.getArgumentNamesFromString(fnString).join(', ') }) {
const fnString = source.toString();
return new Function(`return function ${ name } (${ utils.getArgumentNamesFromString(fnString).join(', ') }) {
${ utils.getFunctionBodyFromString(fnString) }
}`)();
}

module.exports = {
alias
};
alias
};
Loading

0 comments on commit 20ee1f7

Please sign in to comment.