This repository has been archived by the owner on Feb 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 448f1f2
Showing
10 changed files
with
254 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
# use line feed | ||
end_of_line = lf | ||
|
||
# ensure file ends with a newline when saving | ||
insert_final_newline = true | ||
|
||
# soft tabs | ||
indent_style = space | ||
|
||
# number of columns used for each indentation level | ||
indent_size = 2 | ||
|
||
# remove any whitespace characters preceding newline characters | ||
trim_trailing_whitespace = true | ||
|
||
# character set | ||
charset = utf-8 |
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,2 @@ | ||
# Convert line endings to LF (Line Feed) | ||
* text=auto |
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,103 @@ | ||
//this will affect all the git repos | ||
git config --global core.excludesfile ~/.gitignore | ||
|
||
|
||
//update files since .ignore won't if already tracked | ||
git rm --cached <file> | ||
|
||
# Compiled source # | ||
################### | ||
*.com | ||
*.class | ||
*.dll | ||
*.exe | ||
*.o | ||
*.so | ||
|
||
# Packages # | ||
############ | ||
# it's better to unpack these files and commit the raw source | ||
# git has its own built in compression methods | ||
*.7z | ||
*.dmg | ||
*.gz | ||
*.iso | ||
*.jar | ||
*.rar | ||
*.tar | ||
*.zip | ||
|
||
# Logs and databases # | ||
###################### | ||
*.log | ||
*.sql | ||
*.sqlite | ||
|
||
# OS generated files # | ||
###################### | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
# Icon? | ||
ehthumbs.db | ||
Thumbs.db | ||
.cache | ||
.project | ||
.settings | ||
.tmproj | ||
*.esproj | ||
nbproject | ||
|
||
# Numerous always-ignore extensions # | ||
##################################### | ||
*.diff | ||
*.err | ||
*.orig | ||
*.rej | ||
*.swn | ||
*.swo | ||
*.swp | ||
*.vi | ||
*~ | ||
*.sass-cache | ||
*.grunt | ||
*.tmp | ||
|
||
# Dreamweaver added files # | ||
########################### | ||
_notes | ||
dwsync.xml | ||
|
||
# Komodo # | ||
########################### | ||
*.komodoproject | ||
.komodotools | ||
|
||
# Node # | ||
##################### | ||
node_modules | ||
|
||
# Bower # | ||
##################### | ||
bower_components | ||
|
||
# Folders to ignore # | ||
##################### | ||
.hg | ||
.svn | ||
.CVS | ||
intermediate | ||
publish | ||
.idea | ||
.graphics | ||
_test | ||
_archive | ||
uploads | ||
tmp | ||
|
||
# Vim files to ignore # | ||
####################### | ||
.VimballRecord | ||
.netrwhist |
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 @@ | ||
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
|
||
## 0.0.2 - 2014-11-26 | ||
### Changed | ||
- `slopeAngle.calc()` to simply `slopeAngle()` |
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,21 @@ | ||
MIT license | ||
|
||
Copyright (C) 2014 Miguel Mota | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
of the Software, and to permit persons to whom the Software is furnished to do | ||
so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,17 @@ | ||
# Commafy | ||
|
||
# Install | ||
|
||
```bash | ||
npm install commafy | ||
``` | ||
|
||
# Usage | ||
|
||
```javascript | ||
commafy(1000000) // '1,000,000' | ||
``` | ||
|
||
# License | ||
|
||
MIT |
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,22 @@ | ||
{ | ||
"name": "commafy", | ||
"main": "commafy.js", | ||
"version": "0.0.1", | ||
"homepage": "https://github.com/miguelmota/commafy", | ||
"authors": [ | ||
"Miguel Mota <miguelmota2@gmail.com>" | ||
], | ||
"description": "Add commas to a number", | ||
"keywords": [ | ||
"number", | ||
"commafy" | ||
], | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests" | ||
], | ||
"license": "MIT" | ||
} |
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,16 @@ | ||
(function(){ | ||
|
||
function commafy(n) { | ||
if (!n) { return n; } | ||
var parts = n.toString().split('.'); | ||
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ','); | ||
return parts.join('.'); | ||
} | ||
|
||
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') { | ||
module.exports = commafy; | ||
} else { | ||
window.commafy = commafy; | ||
} | ||
|
||
})(); |
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,29 @@ | ||
{ | ||
"name": "commafy", | ||
"version": "0.0.1", | ||
"description": "Add commas to a number", | ||
"main": "index.js", | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"test": "tape test/*.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/miguelmota/commafy" | ||
}, | ||
"keywords": [ | ||
"number", | ||
"commas" | ||
], | ||
"author": "Miguel Mota <hello@miguelmota.com> (http://www.miguelmota.com/)", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/miguelmota/commafy/issues" | ||
}, | ||
"homepage": "https://github.com/miguelmota/commafy", | ||
"dependencies": { | ||
"tape": "^3.0.3" | ||
} | ||
} |
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,15 @@ | ||
var test = require('tape'); | ||
var commafy = require('../commafy'); | ||
|
||
test('commafy', function (t) { | ||
t.plan(8); | ||
|
||
t.equal(commafy(1000000), '1,000,000'); | ||
t.equal(commafy(1000), '1,000'); | ||
t.equal(commafy(100), '100'); | ||
t.equal(commafy(85), '85'); | ||
t.equal(commafy(10200.50), '10,200.5'); | ||
t.equal(commafy((10200.50).toFixed(3)), '10,200.500'); | ||
t.equal(commafy(1000.5023), '1,000.5023'); | ||
t.equal(commafy(14734534.53), '14,734,534.53'); | ||
}); |