Skip to content

Commit

Permalink
Merge pull request #89 from SecretBase/v2
Browse files Browse the repository at this point in the history
Road to v2
  • Loading branch information
SecretBase authored Oct 11, 2017
2 parents 43e76a9 + 5e96bc3 commit d3c8ce5
Show file tree
Hide file tree
Showing 24 changed files with 9,226 additions and 2,916 deletions.
9 changes: 9 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"presets": [
["env", {
"targets": {
"node": "6.11"
}
}]
]
}
6 changes: 6 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "aftership",
"rules": {
"max-lines": 0
}
}
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ node_modules/
npm-debug.log

.publishrc
.npmignore

# ==== build output
dist
web

coverage
183 changes: 183 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
# v1.0.4 2015-05-06


# ------------------------------------------------------------------------------
# Add your custom excludes below
# ------------------------------------------------------------------------------
.nyc_output/
.npmrc
.vscode/
.tern-project
lib/
src/
example/
.babelrc
.eslintignore
.flowconfig
.gitignore
.publishrc
.stylelintrc
example.config.json
gulfile.babel.js
jest.config.json
litmus-support-clients.js
flow-typed
__tests__/
webpack.config.js
.eslintrc


# =============== log ignore builtAssets

/tmp/*
/builtAssets/*
*.log
.nyc_output/
coverage/

# =========================== DO NOT touch below v1.0.3 ===============================


node_modules

# =============== RubyMine.gitignore
# =============== PhPStorm.gitignore
.idea


# =============== OSX.gitignore
.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# =============== # Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Except the .htpassed
!.htpasswd
!.nodemonignore

npm-debug.log

dump.rdb








# FROM https://github.com/niftylettuce/node-email-templates/blob/master/.gitignore

# ------------------------------------------------------------------------------
# Common Node files and folders
# https://github.com/github/gitignore/blob/master/Node.gitignore
# ------------------------------------------------------------------------------

lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz

pids
log
results

node_modules
npm-debug.log


# ------------------------------------------------------------------------------
# Nodemon
# ------------------------------------------------------------------------------

.monitor


# ------------------------------------------------------------------------------
# JSHint
# ------------------------------------------------------------------------------

jshint


# ------------------------------------------------------------------------------
# Numerous always-ignore extensions
# ------------------------------------------------------------------------------

*.diff
*.err
*.orig
*.rej
*.swo
*.swp
*.vi
*~
*.sass-cache


# ------------------------------------------------------------------------------
# Files from other repository control systems
# ------------------------------------------------------------------------------

.hg
.svn
.CVS


# ------------------------------------------------------------------------------
# PHPStorm, RubyMine
# ------------------------------------------------------------------------------

.idea


# ------------------------------------------------------------------------------
# OS X and other IDE's folder attributes
# ------------------------------------------------------------------------------

.DS_Store
Thumbs.db
.cache
.project
.settings
.tmproj
*.esproj
nbproject
*.sublime-project
*.sublime-workspace


# ------------------------------------------------------------------------------
# Dreamweaver added files
# ------------------------------------------------------------------------------

_notes
dwsync.xml


# ------------------------------------------------------------------------------
# Komodo
# ------------------------------------------------------------------------------

*.komodoproject
.komodotools
bower_components

config/examples.json
config.json
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## What is node-phone?
`node-phone` is used to normalize the `mobile` phone number into a E.164 format.
## What is phone?
`phone` is used to normalize the `mobile` phone number into a E.164 format.

The common problem is user normally input the phone number in this way:

Expand All @@ -16,10 +16,16 @@ What we want is always:
+18175698900
```

## Old browsers & browser support

We currently transpile script to base on target env which that browser global usage '>1%' and "node: 6.10".

You can check on the [brwoserlist](http://browserl.ist/?q=%3E1%25)
You also need polyfill for some old browser more details please read the `README` inside the `example` folder

##FAQ (1.x branch)

1. Does node-phone do any phone validation?
1. Does `phone` do any phone validation?

Yes: If you provide the 2nd parameter (country), and the phone number do not start with `+` sign.

Expand All @@ -42,7 +48,7 @@ We don't validate if the number is mobile or not.

##FAQ (0.0.x branch)

1. Does node-phone do any phone validation?
1. Does phone do any phone validation?

Yes: If you provide the 2nd parameter (country), and the phone number do not start with `+` sign.

Expand Down Expand Up @@ -125,7 +131,7 @@ Please open an issue and let us know.

* 1.0.6 Apply pull request #30, #45, #46

* 1.0.5 Bug fix for [#31](https://github.com/AfterShip/node-phone/issues/31), allow [extend more easily](https://github.com/AfterShip/node-phone/issues/32)
* 1.0.5 Bug fix for [#31](https://github.com/AfterShip/phone/issues/31), allow [extend more easily](https://github.com/AfterShip/phone/issues/32)

* 1.0.4 Support more countries with mobile prefix

Expand All @@ -147,4 +153,3 @@ Please open an issue and let us know.

## License
MIT

6 changes: 6 additions & 0 deletions __tests__/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "aftership",
env: {
"jest": true
}
}
Loading

0 comments on commit d3c8ce5

Please sign in to comment.