Skip to content

Commit

Permalink
Merge pull request #374 from neomjs/dev
Browse files Browse the repository at this point in the history
v1.0.65
  • Loading branch information
tobiu authored Mar 25, 2020
2 parents 97cbdba + 0238d0c commit 6985b4f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
4 changes: 4 additions & 0 deletions apps/covid/Util.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ class Util extends Base {
* @return {String}
*/
static formatNumber(value, color) {
if (!Neo.isNumber(value)) {
return '';
}

value = value.toLocaleString(Util.locales);

return typeof color !== 'string' ? value : `<span style="color:${color};">${value}</span>`;
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": "neo.mjs",
"version": "1.0.64",
"version": "1.0.65",
"description": "The webworkers driven UI framework",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/container/Base.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Base extends Component {
let me = this,
config = super.mergeConfig(...args);

// avoid any inferference on prototype level
// avoid any interference on prototype level
// does not clone existing Neo instances

if (config.itemDefaults) {
Expand Down
14 changes: 14 additions & 0 deletions src/util/Function.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ class NeoFunction extends Base {
className: 'Neo.util.Function'
}}

/**
* Append args instead of prepending them
* @param {Object} scope
* @returns {Function}
*/
static bindAppend(scope) {
const fn = this,
args = [].slice.call(arguments).slice(1);

return function() {
return fn.apply(scope, [].slice.call(arguments).concat(args));
}
}

/**
*
* @param {Neo.core.Base} target
Expand Down

0 comments on commit 6985b4f

Please sign in to comment.