Skip to content

Commit b431973

Browse files
committed
Release. Bump version number
1 parent 04e50d5 commit b431973

File tree

5 files changed

+72
-42
lines changed

5 files changed

+72
-42
lines changed

docs/_coverpage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Barchart Market Data SDK <small>JavaScript 6.0.1</small>
1+
# Barchart Market Data SDK <small>JavaScript 6.0.2</small>
22

33
> Inject real-time market data into your JavaScript applications
44

example/browser/example.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5312,7 +5312,7 @@ module.exports = (() => {
53125312
'use strict';
53135313

53145314
return {
5315-
version: '6.0.1'
5315+
version: '6.0.2'
53165316
};
53175317
})();
53185318

@@ -6910,6 +6910,8 @@ module.exports = (() => {
69106910
return sign * (parseInt(str) / 100000);
69116911
case 'E':
69126912
return sign * (parseInt(str) / 1000000);
6913+
case 'F':
6914+
return sign * (parseInt(str) / 10000000);
69136915
default:
69146916
return sign * parseInt(str);
69156917
}
@@ -8519,11 +8521,13 @@ module.exports = (() => {
85198521
})();
85208522

85218523
},{"./assert":51}],49:[function(require,module,exports){
8522-
const getTimezoneOffset = require('date-fns-tz/getTimezoneOffset');
85238524
const assert = require('./assert'),
85248525
Enum = require('./Enum'),
85258526
is = require('./is'),
85268527
timezone = require('./timezone');
8528+
const getTimezoneOffsetA = require('date-fns-tz/getTimezoneOffset'),
8529+
getTimezoneOffsetB = require('date-fns-tz/getTimezoneOffset').default;
8530+
const getTimezoneOffset = is.fn(getTimezoneOffsetB) ? getTimezoneOffsetB : getTimezoneOffsetA;
85278531
module.exports = (() => {
85288532
'use strict';
85298533

lib/meta.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ module.exports = (() => {
22
'use strict';
33

44
return {
5-
version: '6.0.1'
5+
version: '6.0.2'
66
};
77
})();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@barchart/marketdata-api-js",
3-
"version": "6.0.1",
3+
"version": "6.0.2",
44
"description": "SDK for streaming market data from Barchart.com",
55
"author": {
66
"name": "Eero Pikat",

test/dist/barchart-marketdata-api-tests-6.js

Lines changed: 63 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2437,6 +2437,8 @@ module.exports = (() => {
24372437
return sign * (parseInt(str) / 100000);
24382438
case 'E':
24392439
return sign * (parseInt(str) / 1000000);
2440+
case 'F':
2441+
return sign * (parseInt(str) / 10000000);
24402442
default:
24412443
return sign * parseInt(str);
24422444
}
@@ -3484,11 +3486,13 @@ module.exports = (() => {
34843486
})();
34853487

34863488
},{"./assert":37}],35:[function(require,module,exports){
3487-
const getTimezoneOffset = require('date-fns-tz/getTimezoneOffset');
34883489
const assert = require('./assert'),
34893490
Enum = require('./Enum'),
34903491
is = require('./is'),
34913492
timezone = require('./timezone');
3493+
const getTimezoneOffsetA = require('date-fns-tz/getTimezoneOffset'),
3494+
getTimezoneOffsetB = require('date-fns-tz/getTimezoneOffset').default;
3495+
const getTimezoneOffset = is.fn(getTimezoneOffsetB) ? getTimezoneOffsetB : getTimezoneOffsetA;
34923496
module.exports = (() => {
34933497
'use strict';
34943498

@@ -11006,6 +11010,16 @@ describe('when valid prices are formatted', () => {
1100611010
});
1100711011
});
1100811012
});
11013+
describe('with a unit code of "F"', () => {
11014+
describe('with a decimal fraction separator', () => {
11015+
it('formats 0 as "0"', () => {
11016+
expect(formatPrice(0, 'F', '.')).toEqual('0.0000000');
11017+
});
11018+
it('formats 0.007312 as "0.0073120"', () => {
11019+
expect(formatPrice(0.007312, 'F', '.')).toEqual('0.0073120');
11020+
});
11021+
});
11022+
});
1100911023
describe('with a unit code of "2"', () => {
1101011024
describe('with default arguments', () => {
1101111025
it('formats 0 as "0.000"', () => {
@@ -12238,44 +12252,56 @@ describe('when parsing prices', () => {
1223812252
'use strict';
1223912253

1224012254
describe('with a decimal fraction separator', () => {
12241-
it('returns 0.75 (with unit code 2) when parsing ".75"', () => {
12242-
expect(parseValue('.75', '2')).toEqual(0.75);
12243-
});
12244-
it('returns 377 (with unit code 2) when parsing "377.000"', () => {
12245-
expect(parseValue('377.000', '2')).toEqual(377);
12246-
});
12247-
it('returns 377.5 (with unit code 2) when parsing "377.500"', () => {
12248-
expect(parseValue('377.500', '2')).toEqual(377.5);
12249-
});
12250-
it('returns 377.75 (with unit code 2) when parsing "377.750"', () => {
12251-
expect(parseValue('377.750', '2')).toEqual(377.75);
12252-
});
12253-
it('returns 3770.75 (with unit code 2) when parsing "3770.750"', () => {
12254-
expect(parseValue('3770.750', '2')).toEqual(3770.75);
12255-
});
12256-
it('returns 37700.75 (with unit code 2) when parsing "37700.750"', () => {
12257-
expect(parseValue('37700.750', '2')).toEqual(37700.75);
12258-
});
12259-
it('returns 377000.75 (with unit code 2) when parsing "377000.750"', () => {
12260-
expect(parseValue('377000.750', '2')).toEqual(377000.75);
12261-
});
12262-
it('returns 3770000.75 (with unit code 2) when parsing "3770000.750"', () => {
12263-
expect(parseValue('3770000.750', '2')).toEqual(3770000.75);
12264-
});
12265-
it('returns 3770000 (with unit code 2) when parsing "3770000.000"', () => {
12266-
expect(parseValue('3770000.000', '2')).toEqual(3770000);
12267-
});
12268-
it('returns 0 (with unit code 2) when parsing "0.000"', () => {
12269-
expect(parseValue('0.000', '2')).toEqual(0);
12270-
});
12271-
it('returns undefined (with unit code 2) when parsing zero-length string', () => {
12272-
expect(parseValue('', '2')).toEqual(undefined);
12255+
describe('with unit code "2"', () => {
12256+
it('returns 0.75 when parsing ".75"', () => {
12257+
expect(parseValue('.75', '2')).toEqual(0.75);
12258+
});
12259+
it('returns 377 when parsing "377.000"', () => {
12260+
expect(parseValue('377.000', '2')).toEqual(377);
12261+
});
12262+
it('returns 377.5 when parsing "377.500"', () => {
12263+
expect(parseValue('377.500', '2')).toEqual(377.5);
12264+
});
12265+
it('returns 377.75 when parsing "377.750"', () => {
12266+
expect(parseValue('377.750', '2')).toEqual(377.75);
12267+
});
12268+
it('returns 3770.75 when parsing "3770.750"', () => {
12269+
expect(parseValue('3770.750', '2')).toEqual(3770.75);
12270+
});
12271+
it('returns 37700.75 when parsing "37700.750"', () => {
12272+
expect(parseValue('37700.750', '2')).toEqual(37700.75);
12273+
});
12274+
it('returns 377000.75 when parsing "377000.750"', () => {
12275+
expect(parseValue('377000.750', '2')).toEqual(377000.75);
12276+
});
12277+
it('returns 3770000.75 when parsing "3770000.750"', () => {
12278+
expect(parseValue('3770000.750', '2')).toEqual(3770000.75);
12279+
});
12280+
it('returns 3770000 when parsing "3770000.000"', () => {
12281+
expect(parseValue('3770000.000', '2')).toEqual(3770000);
12282+
});
12283+
it('returns 0 (with when parsing "0.000"', () => {
12284+
expect(parseValue('0.000', '2')).toEqual(0);
12285+
});
12286+
it('returns undefined when parsing zero-length string', () => {
12287+
expect(parseValue('', '2')).toEqual(undefined);
12288+
});
1227312289
});
12274-
it('returns 0 (with unit code 8) when parsing "0"', () => {
12275-
expect(parseValue('0', '8')).toEqual(0);
12290+
describe('with unit code "8"', () => {
12291+
it('returns 0 when parsing "0"', () => {
12292+
expect(parseValue('0', '8')).toEqual(0);
12293+
});
12294+
it('returns 1000 when parsing "1000"', () => {
12295+
expect(parseValue('1000', '8')).toEqual(1000);
12296+
});
1227612297
});
12277-
it('returns 1000 (with unit code 8) when parsing "1000"', () => {
12278-
expect(parseValue('1000', '8')).toEqual(1000);
12298+
describe('with unit code "F"', () => {
12299+
it('returns 0 when parsing "0"', () => {
12300+
expect(parseValue('0', 'F')).toEqual(0);
12301+
});
12302+
it('returns 0.0073120 when parsing "73120"', () => {
12303+
expect(parseValue('73120', 'F')).toEqual(0.0073120);
12304+
});
1227912305
});
1228012306
});
1228112307
describe('with a decimal fraction separator and a comma thousands separator', () => {

0 commit comments

Comments
 (0)