ofo-helpers
Advanced tools
Comparing version 1.0.0 to 1.0.1
14
index.js
@@ -40,2 +40,16 @@ export const reorder_rectangle_points = points => { | ||
return output; | ||
} | ||
export const toTitle = str => !str ? '' : str.split(' ').map(s => s.charAt(0).toUpperCase() + s.slice(1)).join(' '); | ||
export const isDefined = i => typeof i != 'undefined' && i != null; | ||
export const isValidURL = str => { | ||
var pattern = new RegExp('^(https?:\\/\\/)?' + // protocol | ||
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name | ||
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address | ||
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path | ||
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string | ||
'(\\#[-a-z\\d_]*)?$', 'i'); // fragment locator | ||
return !!pattern.test(str); | ||
} |
{ | ||
"name": "ofo-helpers", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "OFO Tech Helpers", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"publish": "npm publish --access=public && git add . && git commit -m 'bug fix' && git push" | ||
}, | ||
@@ -9,0 +10,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2310
48