cfpb-chart-builder
Advanced tools
Comparing version 3.8.1 to 4.0.0
{ | ||
"name": "cfpb-chart-builder", | ||
"version": "3.8.1", | ||
"version": "4.0.0", | ||
"description": "Charts for the Consumer Financial Protection Bureau", | ||
@@ -5,0 +5,0 @@ "main": "src/js/index.js", |
@@ -92,6 +92,6 @@ const getTileMapColor = require( './get-tile-map-color' ); | ||
let projectedMonths = 6; | ||
// set number of months of projected data based on whether source filename includes 'inq' or 'den' for inquiries or denials | ||
// set number of months of projected data based on whether source filename includes 'inq' or 'crt' for inquiries or credit tightness | ||
if ( source && source.indexOf( 'inq_' ) !== -1 ) { | ||
projectedMonths = 4; | ||
} else if ( source && source.indexOf( 'den_' ) !== -1 ) { | ||
} else if ( source && source.indexOf( 'crt_' ) !== -1 ) { | ||
projectedMonths = 0; | ||
@@ -155,4 +155,4 @@ } | ||
* For Consumer Credit Trends data, projected data is for the last 6 months, | ||
* except for inquiry index data, which is for the last 4 months, and inferred | ||
* denials index data, which has no projected data. | ||
* except for inquiry index data, which is for the last 4 months, and credit | ||
* tightness index data, which has no projected data. | ||
* | ||
@@ -159,0 +159,0 @@ * @param {Array} valuesList - |
@@ -170,6 +170,6 @@ const processJSON = require( '../../../src/js/utils/process-json' ); | ||
it( 'should assign the correct projected dates, ' + | ||
'0 months for inferred denial charts', () => { | ||
const testDataDen = originations( data, 'test', 'den_test_file.csv' ); | ||
expect( testDataDen.projectedDate.timestamp ).toBeUndefined(); | ||
expect( testDataDen.projectedDate.label ).toBeNull(); | ||
'0 months for credit tightness charts', () => { | ||
const testDataTightness = originations( data, 'test', 'crt_test_file.csv' ); | ||
expect( testDataTightness.projectedDate.timestamp ).toBeUndefined(); | ||
expect( testDataTightness.projectedDate.label ).toBeNull(); | ||
} ); | ||
@@ -176,0 +176,0 @@ |
Sorry, the diff of this file is not supported yet
2106567