feat: full syntax for strftime, close #177

- strftime syntax: <flags><width><modifier><conversion>
- new conversions: %n, %t
- fixed conversions: %N
- flags: _ ^ - 0 # :
- modifiers: E, O (ignored)
This commit is contained in:
harttle
2019-12-15 02:28:33 +00:00
parent c69ad538d4
commit ba5ff3f41c
7 changed files with 368 additions and 253 deletions
+13
View File
@@ -95,4 +95,17 @@ describe('util/underscore', function () {
expect(_.isObject(2)).to.be.false
})
})
describe('.padEnd()', function () {
it('should default ch to " "', () => {
expect(_.padEnd('foo', 5)).to.equal('foo ')
})
})
describe('.changeCase()', function () {
it('should to upper case if there is one lowercase', () => {
expect(_.changeCase('fooA')).to.equal('FOOA')
})
it('should to lower case if all upper case', () => {
expect(_.changeCase('FOOA')).to.equal('fooa')
})
})
})