![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@bgunnarsson/tel-input
Advanced tools
TelInput is a customizable telephone input field with dropdown country selection.
TelInput
class in your project.loadModules
function provides country and flag data.import TelInput from './path/to/tel-input.js';
const telInput = new TelInput({
target: '.tel-input',
wrapper: '.tel-input-wrapper',
country: 'us', // Default country ISO code
code: '+1', // Default country code
exclude: ['fr', 'de'], // Countries to exclude
priority: ['us', 'ca'], // Priority countries
search: {
placeholder: 'Search countries...'
}
});
<div class="tel-input">
<div class="tel-input-wrapper">
<input type="text" placeholder="Enter phone number">
</div>
</div>
Option | Type | Default | Description |
---|---|---|---|
target | string | .bg-telinput | CSS selector for the target input container. |
wrapper | string | .bg-telinput__input-wrap | CSS selector for the input wrapper. |
country | string | is | Default country ISO code. |
code | string | +354 | Default country code. |
exclude | array | [] | Array of ISO codes to exclude. |
priority | array | [] | Array of priority ISO codes. |
search.placeholder | string | '' | Placeholder text for the search input. |
Creates a new instance of TelInput
.
init()
Initializes the component, loads modules, and sets up event listeners.
<div class="tel-input">
<div class="tel-input-wrapper">
<input type="text" placeholder="Enter phone number">
</div>
</div>
const telInput = new TelInput({
target: '.tel-input',
wrapper: 'tel-input-wrapper',
country: 'is',
code: '+354',
priority: ['is', 'us', 'gb'],
exclude: ['al', 'af']
search: {
placeholder: 'Search countries...'
}
});
This project is licensed under the MIT License.
FAQs
International Telephone Input JavaScript library
We found that @bgunnarsson/tel-input demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.