Skip to content

Commit

Permalink
fix badges
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn Inder committed Oct 13, 2016
1 parent 5791073 commit f9d5aef
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 17 deletions.
14 changes: 10 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
# .travis.yml
language: node_js
git:
depth: 1
addons:
apt:
packages:
- xvfb
node_js:
- '5.4'
- '4.4'
- '6.2'
- '6.3'
notifications:
email: false
script: npm run travis
deploy:
- provider: npm
email: jim@vigour.io
api_key: ${NPM_TOKEN}
on:
branch: master
before_install:
- export DISPLAY=':99.0'
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- npm install -g vigour-test
- npm install -g vigour-test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Checks whether provided parameter looks like a valid e-mail address
<!-- VDOC END -->

```javascript
var isEmail = require('nice-is-email')
const isEmail = require('nice-is-email')
isEmail('foo@bar.com') // true
isEmail('@bar') // false
```
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'
var email = /^([^.](?![a-zA-Z0-9!#$%&'*+\-/=?^_`{|}~]+\.\.)([a-zA-Z0-9!#$%&'*+\-/=?^_`{|}~.]+[^.])|([a-zA-Z0-9]{1,2}))@([A-Za-z0-9-]{1,64}\.){1,10}[a-zA-Z]{2,64}$/
const email = /^([^.](?![a-zA-Z0-9!#$%&'*+\-/=?^_`{|}~]+\.\.)([a-zA-Z0-9!#$%&'*+\-/=?^_`{|}~.]+[^.])|([a-zA-Z0-9]{1,2}))@([A-Za-z0-9-]{1,64}\.){1,10}[a-zA-Z]{2,64}$/

/**
* @id isEmail
Expand Down
19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "NODE_ENV=test node test | tap-difflet && vtest test | tap-difflet && standard",
"cover": "istanbul cover --report none --print detail test/index.js",
"view-cover": "istanbul report html && open ./coverage/index.html",
"watch": "nodemon test | tap-difflet",
"dev": "nodemon test | tap-difflet",
"travis": "npm run cover -s && istanbul report lcov && ((cat coverage/lcov.info | coveralls) || exit 0)"
},
"repository": {
Expand All @@ -30,14 +30,19 @@
"Jim De Beer <jim@vigour.io>",
"Shawn Inder <shawn@vigour.io>"
],
"dependencies": {},
"dependencies": {
"bubleify": "^0.5.1"
},
"engines": {},
"devDependencies": {
"browserify": "^13.1.0",
"bubleify": "^0.5.1",
"istanbul": "^0.4.5",
"standard": "^7.1.2",
"tape": "^4.5.1"
"ducktape": "^1.0.0",
"coveralls": "^2.11.9",
"nodemon": "^1.9.1",
"pre-commit": "^1.1.3",
"istanbul": "^0.4.4",
"standard": "^8.1.0",
"tape": "4.4.0",
"tap-difflet": "0.6.0"
},
"browserify": {
"transform": [
Expand Down
8 changes: 4 additions & 4 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict'
var test = require('tape')
var isEmail = require('../')
const test = require('tape')
const isEmail = require('../')

// The following test cases are based on https://en.wikipedia.org/wiki/Email_address#Syntax
var localParts = [
const localParts = [
// ['email', expectedResult]
[makeChars(64) + '', true], // length
[makeChars(65) + '', false], // length
Expand Down Expand Up @@ -33,7 +33,7 @@ var localParts = [
return item
})

var domainParts = [
const domainParts = [
['normal.com', false], // missing `@`
['@normal.com', true], // normal
['@hey(comment)ho.com', false], // comments
Expand Down

0 comments on commit f9d5aef

Please sign in to comment.