-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix to remove leading spaces * fix to remove trailing punctuation * drop component support * cleanup readme * add travis ci * update coding style
- Loading branch information
1 parent
4841c75
commit e2bf1d1
Showing
13 changed files
with
105 additions
and
5,671 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
node_modules | ||
components | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
language: node_js | ||
script: make test | ||
node_js: | ||
- "stable" | ||
- "4" | ||
- "0.12" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,11 @@ | ||
|
||
build: node_modules components index.js | ||
@component build --dev | ||
|
||
components: component.json | ||
@component install --dev | ||
|
||
clean: | ||
@rm -fr build node_modules components | ||
|
||
# Install node modules. | ||
node_modules: package.json | ||
@npm install | ||
|
||
test: build | ||
@open test/index.html | ||
# Run the tests. | ||
test: | ||
@./node_modules/.bin/mocha | ||
|
||
.PHONY: clean test | ||
# Phony targets. | ||
.PHONY: test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
{ | ||
"name": "to-capital-case", | ||
"version": "1.0.0", | ||
"description": "Convert a string to capital case.", | ||
"repository": "git:https://github.com/ianstormtaylor/to-capital-case.git", | ||
"license": "MIT", | ||
"version": "0.1.1", | ||
"description": "Convert a string to capital case.", | ||
"keywords": ["capital", "case", "capitalcase", "string"], | ||
"dependencies": { | ||
"to-no-case": "0.1.1" | ||
} | ||
} | ||
"to-space-case": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "^2.3.4" | ||
}, | ||
"keywords": [ | ||
"capital", | ||
"case", | ||
"capitalcase", | ||
"string" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
var assert = require('assert') | ||
var capital = require('..') | ||
|
||
/** | ||
* Cases. | ||
*/ | ||
|
||
var strings = { | ||
camel: 'thisIsAString', | ||
capital: 'This Is A String', | ||
constant: 'THIS_IS_A_STRING', | ||
dot: 'this.is.a.string', | ||
pascal: 'ThisIsAString', | ||
sentence: 'This is a string.', | ||
snake: 'this_is_a_string', | ||
space: 'this is a string', | ||
title: 'This Is a String', | ||
junk: '-this__is$%a-string...' | ||
} | ||
|
||
/** | ||
* Tests. | ||
*/ | ||
|
||
describe('to-capital-case', function () { | ||
for (var key in strings) test(key) | ||
}) | ||
|
||
/** | ||
* Create a test for a given case `key`. | ||
* | ||
* @param {String} key | ||
*/ | ||
|
||
function test(key) { | ||
it('should convert ' + key + ' case', function () { | ||
assert.equal(capital(strings[key]), 'This Is A String') | ||
}) | ||
} |
Oops, something went wrong.