fulcrum-core
Advanced tools
Comparing version 0.6.3 to 0.6.4
@@ -105,3 +105,3 @@ 'use strict'; | ||
if (!this._localeDecimalFormatter && intl) { | ||
this._localeDecimalFormatter = new intl.NumberFormat(); | ||
this._localeDecimalFormatter = new intl.NumberFormat([], MachineFormatterOptions); | ||
} | ||
@@ -115,3 +115,3 @@ | ||
if (!this._localeIntegerFormatter && intl) { | ||
this._localeIntegerFormatter = new intl.NumberFormat([], { maximumFractionDigits: 0 }); | ||
this._localeIntegerFormatter = new intl.NumberFormat([], { useGrouping: false, maximumFractionDigits: 0 }); | ||
} | ||
@@ -118,0 +118,0 @@ |
{ | ||
"name": "fulcrum-core", | ||
"version": "0.6.3", | ||
"version": "0.6.4", | ||
"description": "Fulcrum Core", | ||
@@ -5,0 +5,0 @@ "homepage": "http://github.com/fulcrumapp/fulcrum-core", |
@@ -31,3 +31,3 @@ import Locale from './locale'; | ||
if (!this._localeDecimalFormatter && intl) { | ||
this._localeDecimalFormatter = new intl.NumberFormat(); | ||
this._localeDecimalFormatter = new intl.NumberFormat([], MachineFormatterOptions); | ||
} | ||
@@ -40,3 +40,3 @@ | ||
if (!this._localeIntegerFormatter && intl) { | ||
this._localeIntegerFormatter = new intl.NumberFormat([], {maximumFractionDigits: 0}); | ||
this._localeIntegerFormatter = new intl.NumberFormat([], {useGrouping: false, maximumFractionDigits: 0}); | ||
} | ||
@@ -43,0 +43,0 @@ |
@@ -69,5 +69,5 @@ import setup from '../helper'; | ||
value.displayValue.should.eql('1,337'); | ||
value.displayValue.should.eql('1337'); | ||
value.searchableValue.should.eql('1,337'); | ||
value.searchableValue.should.eql('1337'); | ||
@@ -74,0 +74,0 @@ value.toJSON().should.eql('1337'); |
@@ -124,13 +124,13 @@ import setup from '../helper'; | ||
value.displayValue.should.eql('13.2'); | ||
value.displayValue.should.eql('1337.2'); | ||
value.searchableValue.should.eql('13.2'); | ||
value.searchableValue.should.eql('1337.2'); | ||
value.toJSON().should.eql('13.2000'); | ||
value.toJSON().should.eql('1337.2000'); | ||
value.length.should.eql(7); | ||
value.length.should.eql(9); | ||
value.columnValue.should.eql(13.2); | ||
value.columnValue.should.eql(1337.2); | ||
value.numericValue.should.eql(13.2); | ||
value.numericValue.should.eql(1337.2); | ||
}); | ||
@@ -190,31 +190,31 @@ | ||
value.textValue.should.eql('13.2000'); | ||
value.textValue.should.eql('1337.2000'); | ||
// conditions | ||
value.isEqual('13.2000').should.eql(true); | ||
value.isEqual('13.20').should.eql(false); // TODO(zhm) seems wrong | ||
value.isEqual('1337.2000').should.eql(true); | ||
value.isEqual('1337.20').should.eql(false); // TODO(zhm) seems wrong | ||
value.isEqual('12').should.eql(false); | ||
value.isEqual(null).should.eql(false); | ||
value.contains('13').should.eql(true); | ||
value.contains('13.2').should.eql(true); | ||
value.contains('13.200000').should.eql(false); | ||
value.contains('1337').should.eql(true); | ||
value.contains('1337.2').should.eql(true); | ||
value.contains('1337.200000').should.eql(false); | ||
value.contains('a').should.eql(false); | ||
value.contains(null).should.eql(false); | ||
value.startsWith('13').should.eql(true); | ||
value.startsWith('13.2').should.eql(true); | ||
value.startsWith('13.200000').should.eql(false); | ||
value.startsWith('1337').should.eql(true); | ||
value.startsWith('1337.2').should.eql(true); | ||
value.startsWith('1337.200000').should.eql(false); | ||
value.startsWith('a').should.eql(false); | ||
value.startsWith(null).should.eql(false); | ||
value.isLessThan('14').should.eql(true); | ||
value.isLessThan('13.2').should.eql(false); | ||
value.isLessThan('12').should.eql(false); | ||
value.isLessThan('1400').should.eql(true); | ||
value.isLessThan('1337.2').should.eql(false); | ||
value.isLessThan('1200').should.eql(false); | ||
value.isLessThan('a').should.eql(false); | ||
value.isLessThan(null).should.eql(false); | ||
value.isGreaterThan('12').should.eql(true); | ||
value.isGreaterThan('13.2').should.eql(false); | ||
value.isGreaterThan('14').should.eql(false); | ||
value.isGreaterThan('1200').should.eql(true); | ||
value.isGreaterThan('1337.2').should.eql(false); | ||
value.isGreaterThan('1400').should.eql(false); | ||
value.isGreaterThan('a').should.eql(false); | ||
@@ -221,0 +221,0 @@ value.isGreaterThan(null).should.eql(false); |
@@ -55,3 +55,3 @@ { | ||
"ce49": "1337.37", | ||
"cfe6": "13.2000", | ||
"cfe6": "1337.2000", | ||
"cff5": [ | ||
@@ -58,0 +58,0 @@ { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
986335