Socket
Socket
Sign inDemoInstall

react-phone-input

Package Overview
Dependencies
36
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.10.0 to 0.10.1

7

package.json
{
"name": "react-phone-input",
"version": "0.10.0",
"version": "0.10.1",
"description": "A react component to format phone numbers",

@@ -35,2 +35,3 @@ "main": "dist/index.js",

"less-loader": "^2.2.1",
"react-hot-loader": "^1.3.0",
"style-loader": "^0.12.4",

@@ -41,3 +42,5 @@ "url-loader": "^0.5.6",

},
"dependencies": {},
"dependencies": {
"classnames": "^2.1.5"
},
"peerDependencies": {

@@ -44,0 +47,0 @@ "lodash": "^3.6.0",

# react-phone-input
A simple react component to format a phone number as the user types
A simple react component to format a phone number as the user types.
![alt tag](http://i.giphy.com/l41m24L5YTSOifyW4.gif)
##Installation:
```npm install react-phone-input --save```
##Usage:
```jsx
React.render(
<ReactPhoneInput defaultCountry={'us'} />,
document.getElementById('content'));
```
##Options:
| Name | Description |
| :------------- | :----------- |
| defaultCountry | country code to initialize the component|
##License
MIT
// TODO - fix the onlyContries props. Currently expects that as an array of country object, but users should be able to send in array of country isos
import _ from 'lodash';
import React from 'react/addons.js';
import React from 'react';
import countryData from './country_data.js';
import classNames from 'classnames';
let allCountries = countryData.allCountries;
var isModernBrowser = Boolean(document.createElement('input').setSelectionRange);
var style = require('./react-phone-input-style.less');
var isModernBrowser = Boolean(document.createElement('input').setSelectionRange);
let keys = {

@@ -408,3 +409,3 @@ UP: 38,

render() {
var cx = React.addons.classSet;
var cx = classNames;
var dropDownClasses = cx({

@@ -411,0 +412,0 @@ "country-list": true,

@@ -5,4 +5,2 @@ var path = require('path');

var pkg = require('./package.json');
var TARGET = process.env.TARGET;

@@ -27,3 +25,3 @@ var ROOT_PATH = path.resolve(__dirname);

test: /\.(js|jsx)$/,
loader: 'babel-loader',
loader: 'babel',
include: path.resolve(ROOT_PATH, 'src')

@@ -53,3 +51,3 @@ },

loaders: ['react-hot', 'babel?stage=1'],
include: path.resolve(ROOT_PATH, 'app')
include: path.resolve(ROOT_PATH, 'src')
}

@@ -75,2 +73,3 @@ ]

//Production configuration settings

@@ -80,14 +79,20 @@ if (TARGET === 'build') {

entry: {
app: path.resolve(ROOT_PATH, 'src/index.js'),
vendor: Object.keys(pkg.dependencies)
'react-phone-input': path.resolve(ROOT_PATH, 'src/index.js')
},
output: {
path: path.resolve(ROOT_PATH, 'dist'),
filename: 'index.js'
filename: 'index.js',
library: 'ReactPhoneInput',
libraryTarget: 'umd'
},
externals: [{
"lodash": "lodash",
"react": {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react'
}
}],
plugins: [
new webpack.optimize.CommonsChunkPlugin(
'vendor',
'vendors.js'
),
new webpack.DefinePlugin({

@@ -94,0 +99,0 @@ 'process.env': {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc