Skip to content

Commit

Permalink
name => cssName
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Nov 17, 2019
1 parent 1dfe567 commit 9f90c18
Show file tree
Hide file tree
Showing 39 changed files with 58 additions and 58 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ for (const Class of [
require('./renderers/UpperLatin'),
require('./renderers/UpperRoman')
]) {
if (Class.name) {
CounterClassByType[Class.name] = Class;
if (Class.cssName) {
CounterClassByType[Class.cssName] = Class;
}
}
2 changes: 1 addition & 1 deletion lib/renderers/Additive.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const CounterStyle = require('./CounterStyle');

module.exports = class Additive extends CounterStyle {
static get name() {
static get cssName() {
return 'additive';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/Alphabetic.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const CounterStyle = require('./CounterStyle');

module.exports = class Alphabetic extends CounterStyle {
static get name() {
static get cssName() {
return 'alphabetic';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/Armenian.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Adapted from require('cldr').extractRbnfFunctionByType.renderArmenianLower.toString()

module.exports = class Armenian {
static get name() {
static get cssName() {
return 'armenian';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/Cyclic.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const CounterStyle = require('./CounterStyle');

module.exports = class Cyclic extends CounterStyle {
static get name() {
static get cssName() {
return 'cyclic';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/Decimal.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = class DecimalLeadingZero {
static get name() {
static get cssName() {
return 'decimal';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/DecimalLeadingZero.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = class DecimalLeadingZero {
static get name() {
static get cssName() {
return 'decimal-leading-zero';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/Disc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = class Disc {
static get name() {
static get cssName() {
return 'disc';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/Fixed.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const CounterStyle = require('./CounterStyle');

module.exports = class Fixed extends CounterStyle {
static get name() {
static get cssName() {
return 'fixed';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/Georgian.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Adapted from require('cldr').extractRbnfFunctionByType.renderGeorgian.toString()

module.exports = class Georgian {
static get name() {
static get cssName() {
return 'georgian';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/Hebrew.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Adapted from require('cldr').extractRbnfFunctionByType.renderHebrew.toString()

module.exports = class Hebrew {
static get name() {
static get cssName() {
return 'hebrew';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/LowerAlpha.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Alphabetic = require('./Alphabetic');

module.exports = class LowerAlpha extends Alphabetic {
static get name() {
static get cssName() {
return 'lower-alpha';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/LowerGreek.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Adapted from require('cldr').extractRbnfFunctionByType.renderGreekNumeralMinuscules.toString()

module.exports = class LowerGreek {
static get name() {
static get cssName() {
return 'lower-greek';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/LowerLatin.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Alphabetic = require('./Alphabetic');

module.exports = class LowerLatin extends Alphabetic {
static get name() {
static get cssName() {
return 'lower-latin';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/LowerRoman.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Adapted from require('cldr').extractRbnfFunctionByType.renderRomanLower.toString()

module.exports = class LowerRoman {
static get name() {
static get cssName() {
return 'lower-roman';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/None.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = class None {
static get name() {
static get cssName() {
return 'none';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/Numeric.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const CounterStyle = require('./CounterStyle');

module.exports = class Numeric extends CounterStyle {
static get name() {
static get cssName() {
return 'numeric';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/Symbolic.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const CounterStyle = require('./CounterStyle');

module.exports = class Symbolic extends CounterStyle {
static get name() {
static get cssName() {
return 'symbolic';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/UpperAlpha.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Alphabetic = require('./Alphabetic');

module.exports = class LowerLatin extends Alphabetic {
static get name() {
static get cssName() {
return 'upper-alpha';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/UpperLatin.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Alphabetic = require('./Alphabetic');

module.exports = class LowerLatin extends Alphabetic {
static get name() {
static get cssName() {
return 'upper-latin';
}

Expand Down
2 changes: 1 addition & 1 deletion lib/renderers/UpperRoman.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Adapted from require('cldr').extractRbnfFunctionByType.renderRomanUpper.toString()

module.exports = class UpperRoman {
static get name() {
static get cssName() {
return 'upper-roman';
}

Expand Down
4 changes: 2 additions & 2 deletions test/renderers/Additive.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const Additive = require('../../lib/renderers/Additive');
const expect = require('unexpected');

describe('Additive', function() {
it('should have a name of additive', function() {
expect(Additive, 'to have property', 'name', 'additive');
it('should have a cssName of additive', function() {
expect(Additive, 'to have property', 'cssName', 'additive');
});

it('should fall back', function() {
Expand Down
4 changes: 2 additions & 2 deletions test/renderers/Alphabetic.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const Alphabetic = require('../../lib/renderers/Alphabetic');
const expect = require('unexpected');

describe('Alphabetic', function() {
it('should have a name of alphabetic', function() {
expect(Alphabetic, 'to have property', 'name', 'alphabetic');
it('should have a cssName of alphabetic', function() {
expect(Alphabetic, 'to have property', 'cssName', 'alphabetic');
});

it('should wrap around and interpret the symbols as digits', function() {
Expand Down
4 changes: 2 additions & 2 deletions test/renderers/Armenian.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const Armenian = require('../../lib/renderers/Armenian');
const expect = require('unexpected');

describe('Armenian', function() {
it('should have a name of armenian', function() {
expect(Armenian, 'to have property', 'name', 'armenian');
it('should have a cssName of armenian', function() {
expect(Armenian, 'to have property', 'cssName', 'armenian');
});

it('should render a small number', function() {
Expand Down
4 changes: 2 additions & 2 deletions test/renderers/Cyclic.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const Cyclic = require('../../lib/renderers/Cyclic');
const expect = require('unexpected');

describe('Cyclic', function() {
it('should have a name of cyclic', function() {
expect(Cyclic, 'to have property', 'name', 'cyclic');
it('should have a cssName of cyclic', function() {
expect(Cyclic, 'to have property', 'cssName', 'cyclic');
});

it('should wrap around', function() {
Expand Down
4 changes: 2 additions & 2 deletions test/renderers/Decimal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const Decimal = require('../../lib/renderers/Decimal');
const expect = require('unexpected');

describe('Decimal', function() {
it('should have a name of decimal', function() {
expect(Decimal, 'to have property', 'name', 'decimal');
it('should have a cssName of decimal', function() {
expect(Decimal, 'to have property', 'cssName', 'decimal');
});

it('should render a small number', function() {
Expand Down
4 changes: 2 additions & 2 deletions test/renderers/DecimalLeadingZero.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ const DecimalLeadingZero = require('../../lib/renderers/DecimalLeadingZero');
const expect = require('unexpected');

describe('DecimalLeadingZero', function() {
it('should have a name of decimal-leading-zero', function() {
it('should have a cssName of decimal-leading-zero', function() {
expect(
DecimalLeadingZero,
'to have property',
'name',
'cssName',
'decimal-leading-zero'
);
});
Expand Down
4 changes: 2 additions & 2 deletions test/renderers/Disc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const Disc = require('../../lib/renderers/Disc');
const expect = require('unexpected');

describe('Disc', function() {
it('should have a name of disc', function() {
expect(Disc, 'to have property', 'name', 'disc');
it('should have a cssName of disc', function() {
expect(Disc, 'to have property', 'cssName', 'disc');
});

it('should render a small number', function() {
Expand Down
4 changes: 2 additions & 2 deletions test/renderers/Fixed.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const Fixed = require('../../lib/renderers/Fixed');
const expect = require('unexpected');

describe('Fixed', function() {
it('should have a name of fixed', function() {
expect(Fixed, 'to have property', 'name', 'fixed');
it('should have a cssName of fixed', function() {
expect(Fixed, 'to have property', 'cssName', 'fixed');
});

describe('without an explicit fallback', function() {
Expand Down
4 changes: 2 additions & 2 deletions test/renderers/Georgian.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const Georgian = require('../../lib/renderers/Georgian');
const expect = require('unexpected');

describe('Georgian', function() {
it('should have a name of georgian', function() {
expect(Georgian, 'to have property', 'name', 'georgian');
it('should have a cssName of georgian', function() {
expect(Georgian, 'to have property', 'cssName', 'georgian');
});

it('should render a small number', function() {
Expand Down
4 changes: 2 additions & 2 deletions test/renderers/Hebrew.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const Hebrew = require('../../lib/renderers/Hebrew');
const expect = require('unexpected');

describe('Hebrew', function() {
it('should have a name of hebrew', function() {
expect(Hebrew, 'to have property', 'name', 'hebrew');
it('should have a cssName of hebrew', function() {
expect(Hebrew, 'to have property', 'cssName', 'hebrew');
});

it('should render a small number', function() {
Expand Down
4 changes: 2 additions & 2 deletions test/renderers/LowerGreek.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const LowerGreek = require('../../lib/renderers/LowerGreek');
const expect = require('unexpected');

describe('LowerGreek', function() {
it('should have a name of lower-greek', function() {
expect(LowerGreek, 'to have property', 'name', 'lower-greek');
it('should have a cssName of lower-greek', function() {
expect(LowerGreek, 'to have property', 'cssName', 'lower-greek');
});

it('should render a small number', function() {
Expand Down
4 changes: 2 additions & 2 deletions test/renderers/LowerLatin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const LowerLatin = require('../../lib/renderers/LowerLatin');
const expect = require('unexpected');

describe('LowerLatin', function() {
it('should have a name of lower-latin', function() {
expect(LowerLatin, 'to have property', 'name', 'lower-latin');
it('should have a cssName of lower-latin', function() {
expect(LowerLatin, 'to have property', 'cssName', 'lower-latin');
});

it('should render a small number', function() {
Expand Down
4 changes: 2 additions & 2 deletions test/renderers/LowerRoman.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const LowerRoman = require('../../lib/renderers/LowerRoman');
const expect = require('unexpected');

describe('LowerRoman', function() {
it('should have a name of lower-roman', function() {
expect(LowerRoman, 'to have property', 'name', 'lower-roman');
it('should have a cssName of lower-roman', function() {
expect(LowerRoman, 'to have property', 'cssName', 'lower-roman');
});

it('should render a small number', function() {
Expand Down
4 changes: 2 additions & 2 deletions test/renderers/None.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const None = require('../../lib/renderers/None');
const expect = require('unexpected');

describe('None', function() {
it('should have a name of none', function() {
expect(None, 'to have property', 'name', 'none');
it('should have a cssName of none', function() {
expect(None, 'to have property', 'cssName', 'none');
});

it('should render a small number', function() {
Expand Down
4 changes: 2 additions & 2 deletions test/renderers/Numeric.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const Numeric = require('../../lib/renderers/Numeric');
const expect = require('unexpected');

describe('Numeric', function() {
it('should have a name of numeric', function() {
expect(Numeric, 'to have property', 'name', 'numeric');
it('should have a cssName of numeric', function() {
expect(Numeric, 'to have property', 'cssName', 'numeric');
});

it('should wrap around and interpret the symbols as digits', function() {
Expand Down
4 changes: 2 additions & 2 deletions test/renderers/Symbolic.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const Symbolic = require('../../lib/renderers/Symbolic');
const expect = require('unexpected');

describe('Symbolic', function() {
it('should have a name of symbolic', function() {
expect(Symbolic, 'to have property', 'name', 'symbolic');
it('should have a cssName of symbolic', function() {
expect(Symbolic, 'to have property', 'cssName', 'symbolic');
});

it('should wrap around and duplicate the symbols one more time after each wrap', function() {
Expand Down
4 changes: 2 additions & 2 deletions test/renderers/UpperLatin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const UpperLatin = require('../../lib/renderers/UpperLatin');
const expect = require('unexpected');

describe('UpperLatin', function() {
it('should have a name of upper-latin', function() {
expect(UpperLatin, 'to have property', 'name', 'upper-latin');
it('should have a cssName of upper-latin', function() {
expect(UpperLatin, 'to have property', 'cssName', 'upper-latin');
});

it('should render a small number', function() {
Expand Down
4 changes: 2 additions & 2 deletions test/renderers/UpperRoman.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const UpperRoman = require('../../lib/renderers/UpperRoman');
const expect = require('unexpected');

describe('UpperRoman', function() {
it('should have a name of upper-roman', function() {
expect(UpperRoman, 'to have property', 'name', 'upper-roman');
it('should have a cssName of upper-roman', function() {
expect(UpperRoman, 'to have property', 'cssName', 'upper-roman');
});

it('should render a small number', function() {
Expand Down

0 comments on commit 9f90c18

Please sign in to comment.