-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #167 from jlblcc/develop
v0.1.0
- Loading branch information
Showing
723 changed files
with
41,456 additions
and
2,236 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,13 @@ | ||
module.exports = { | ||
root: true, | ||
parserOptions: { | ||
ecmaVersion: 2017, | ||
sourceType: 'module' | ||
}, | ||
extends: 'eslint:recommended', | ||
env: { | ||
browser: true | ||
}, | ||
rules: { | ||
} | ||
}; |
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,24 +1,22 @@ | ||
--- | ||
language: node_js | ||
node_js: | ||
- "4" | ||
- "6" | ||
|
||
sudo: false | ||
dist: trusty | ||
|
||
addons: | ||
chrome: stable | ||
|
||
cache: | ||
directories: | ||
- $HOME/.npm | ||
- $HOME/.cache # includes bowers cache | ||
|
||
env: | ||
global: | ||
# See https://git.io/vdao3 for details. | ||
- JOBS=1 | ||
|
||
before_install: | ||
- npm config set spin false | ||
- npm install -g bower phantomjs-prebuilt | ||
- bower --version | ||
- phantomjs --version | ||
|
||
install: | ||
- npm install | ||
- bower install | ||
|
||
script: | ||
- npm 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 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
export default { | ||
time: { | ||
hhmmss: { | ||
hour: 'numeric', | ||
minute: 'numeric', | ||
second: 'numeric' | ||
} | ||
}, | ||
date: { | ||
hhmmss: { | ||
hour: 'numeric', | ||
minute: 'numeric', | ||
second: 'numeric' | ||
} | ||
}, | ||
number: { | ||
EUR: { | ||
style: 'currency', | ||
currency: 'EUR', | ||
minimumFractionDigits: 2, | ||
maximumFractionDigits: 2 | ||
}, | ||
USD: { | ||
style: 'currency', | ||
currency: 'USD', | ||
minimumFractionDigits: 2, | ||
maximumFractionDigits: 2 | ||
} | ||
} | ||
}; |
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,9 +1,7 @@ | ||
import Ember from 'ember'; | ||
|
||
export function addEm(params) { | ||
return params.reduce(function (a, b) { | ||
return a + b; | ||
}); | ||
return params.reduce((a, b) => Number(a) + Number(b)); | ||
} | ||
|
||
export default Ember.Helper.helper(addEm); |
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,19 @@ | ||
import Ember from 'ember'; | ||
|
||
export function bboxToPoly(params/*, hash*/) { | ||
let bbox = params[0]; | ||
|
||
if(!(bbox.southLatitude && bbox.westLongitude && | ||
bbox.northLatitude && bbox.eastLongitude)) { | ||
return null; | ||
} | ||
|
||
return [ | ||
[bbox.southLatitude, bbox.westLongitude], | ||
[bbox.northLatitude, bbox.westLongitude], | ||
[bbox.northLatitude, bbox.eastLongitude], | ||
[bbox.southLatitude, bbox.eastLongitude] | ||
]; | ||
} | ||
|
||
export default Ember.Helper.helper(bboxToPoly); |
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,19 @@ | ||
import Ember from 'ember'; | ||
|
||
const { | ||
Helper, | ||
get | ||
} = Ember; | ||
|
||
export function getDash(params /*, hash*/ ) { | ||
let obj = params[0]; | ||
let prop = params[1].trim(); | ||
let val = null; | ||
|
||
if(obj) { | ||
val = get(obj, prop); | ||
} | ||
return val || "--"; | ||
} | ||
|
||
export default Helper.helper(getDash); |
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,9 +1,20 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Helper.extend({ | ||
compute(params) { | ||
let obj = params[0], | ||
prop = params[1].trim(); | ||
return obj[prop] || Ember.String.htmlSafe("<em>Not Defined</em>"); | ||
const { | ||
Helper, | ||
get, | ||
String: EmberString | ||
} = Ember; | ||
|
||
export default Helper.helper( | ||
function (params) { | ||
let obj = params[0]; | ||
let prop = params[1].trim(); | ||
let val = null; | ||
|
||
if(obj) { | ||
val = get(obj, prop); | ||
} | ||
return val || EmberString.htmlSafe("<em>Not Defined</em>"); | ||
} | ||
}); | ||
); |
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,27 @@ | ||
import Ember from 'ember'; | ||
import marked from 'npm:marked'; | ||
|
||
const { | ||
String: EmString | ||
} = Ember; | ||
|
||
export function mdMarkdown(params /*, hash*/ ) { | ||
marked.setOptions({ | ||
renderer: new marked.Renderer(), | ||
gfm: true, | ||
tables: true, | ||
breaks: false, | ||
pedantic: false, | ||
sanitize: false, | ||
smartLists: true, | ||
smartypants: false | ||
}); | ||
|
||
if(params[0]) { | ||
return EmString.htmlSafe(marked(params[0])); | ||
} | ||
|
||
return params[1] || 'No text supplied.'; | ||
} | ||
|
||
export default Ember.Helper.helper(mdMarkdown); |
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,10 @@ | ||
import Ember from 'ember'; | ||
const { | ||
Helper | ||
} = Ember; | ||
|
||
export function mod(params) { | ||
return params.reduce((a, b) => Number(a) % Number(b)); | ||
} | ||
|
||
export default Helper.helper(mod); |
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
Oops, something went wrong.