Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-phone-mask

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-phone-mask - npm Package Compare versions

Comparing version 2.1.3 to 3.0.0

bundles/ngx-phone-mask.umd.min.js

446

bundles/ngx-phone-mask.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms')) :
typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@angular/common', '@angular/forms'], factory) :
(factory((global['ngx-phone-mask'] = {}),global.ng.core,global.ng.common,global.ng.forms));
}(this, (function (exports,core,common,forms) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@angular/platform-browser'), require('text-mask-core/dist/textMaskCore'), require('angular2-text-mask')) :
typeof define === 'function' && define.amd ? define('ngx-phone-mask', ['exports', '@angular/core', '@angular/forms', '@angular/platform-browser', 'text-mask-core/dist/textMaskCore', 'angular2-text-mask'], factory) :
(factory((global['ngx-phone-mask'] = {}),global.ng.core,global.ng.forms,global.ng.platformBrowser,global.textMaskCore,global.angular2TextMask));
}(this, (function (exports,core,forms,platformBrowser,textMaskCore,angular2TextMask) { 'use strict';
var noop = function () { };
var masks = [
'1',
'1 (1',
'1 (11',
'1 (111',
'1 (111) 1',
'1 (111) 11',
'1 (111) 11-1',
'1 (111) 11-11',
'1 (111) 11-111',
'1 (111) 111-111',
'1 (111) 111-11-11',
'1 (111) 111-111-11'
];
var clean = function (number) {
return number
.toString()
.replace(/[^\d\^]/gm, '');
};
var format = function (number) {
var /** @type {?} */ lastCharIndex = 0;
var /** @type {?} */ cleanValue = clean(number);
var /** @type {?} */ charCount = cleanValue.replace(/\^/gm, '').length;
if (charCount === 0) {
return {
formatted: '',
cursorPosition: 0
};
}
var /** @type {?} */ mask = masks[charCount - 1];
if (charCount > 1 && !mask) {
return null;
}
var /** @type {?} */ cursorPosition;
var /** @type {?} */ formatted = mask.split('').map(function (c, i) {
if (c === '1') {
if (cleanValue[lastCharIndex] == '^') {
cursorPosition = i + 1;
lastCharIndex++;
}
lastCharIndex++;
return cleanValue[lastCharIndex - 1];
}
else {
return c;
}
}).join('');
if (!cursorPosition) {
cursorPosition = formatted.length;
}
cursorPosition++; // because of '+'
return {
formatted: "+" + formatted,
cursorPosition: cursorPosition
};
};
var NgxPhoneMaskDirective = (function () {
/**
* @param {?} input
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
*/
function NgxPhoneMaskDirective(input) {
this.input = input;
this.onTouchedCallback = noop;
this.onChangeCallback = noop;
this.valueType = 'clean';
this.showMask = true;
this.oldValue = '';
}
/**
* @return {?}
*/
NgxPhoneMaskDirective.prototype.updateInputView = function () {
var /** @type {?} */ input = this.input.nativeElement;
var /** @type {?} */ cursorPosition = input.selectionStart;
var /** @type {?} */ value = this._value;
var /** @type {?} */ valueWithCursor = value.substring(0, cursorPosition) + '^' + value.substring(cursorPosition);
var /** @type {?} */ formatted = format(valueWithCursor);
if (!formatted) {
input.value = this.oldValue;
return;
var TextMaskConfig = /** @class */ (function () {
function TextMaskConfig() {
}
var /** @type {?} */ newValue = formatted.formatted;
if (newValue != input.value) {
input.value = newValue;
input.setSelectionRange(formatted.cursorPosition, formatted.cursorPosition);
}
this.oldValue = newValue;
this.emitValue(newValue);
return TextMaskConfig;
}());
/** @type {?} */
var clean = function (number) {
return number
.toString()
.replace(/[^\d\^\+]/gm, '');
};
/**
* @param {?} v
* We must check whether the agent is Android because composition events
* behave differently between iOS and Android.
* @return {?}
*/
NgxPhoneMaskDirective.prototype.emitValue = function (v) {
var /** @type {?} */ value;
switch (this.valueType) {
case 'clean':
value = v.replace(/[^\d\+]/gm, '');
break;
case 'full':
value = v;
break;
function _isAndroid() {
/** @type {?} */
var userAgent = platformBrowser.ɵgetDOM() ? platformBrowser.ɵgetDOM().getUserAgent() : '';
return /android (\d+)/.test(userAgent.toLowerCase());
}
var NgxPhoneMaskDirective = /** @class */ (function () {
function NgxPhoneMaskDirective(_renderer, _elementRef, _compositionMode) {
this._renderer = _renderer;
this._elementRef = _elementRef;
this._compositionMode = _compositionMode;
this.clean = true;
this.textMaskConfig = {
mask: ['+', /[1-9]/, ' ', '(', /[1-9]/, /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, '-', /\d/, /\d/, '-', /\d/, /\d/],
guide: false,
placeholderChar: '_',
pipe: undefined,
keepCharPositions: false,
};
/**
* Whether the user is creating a composition string (IME events).
*/
this._composing = false;
this.onChange = function (_) {
};
this.onTouched = function () {
};
if (this._compositionMode == null) {
this._compositionMode = !_isAndroid();
}
}
this.onChangeCallback(value);
};
/**
* @return {?}
*/
NgxPhoneMaskDirective.prototype.onInput = function () {
this._value = this.input.nativeElement.value;
this.updateInputView();
};
Object.defineProperty(NgxPhoneMaskDirective.prototype, "value", {
/**
* @param {?} v
* @return {?}
*/
set: function (v) {
var /** @type {?} */ value = v ? v : '';
this._value = value;
this.updateInputView();
},
enumerable: true,
configurable: true
});
NgxPhoneMaskDirective.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this._setupMask(true);
if (this.textMaskInputElement !== undefined) {
this.textMaskInputElement.update(this.inputElement.value);
}
};
/**
* @param {?} changes
* @return {?}
*/
NgxPhoneMaskDirective.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
this._setupMask(true);
if (this.textMaskInputElement !== undefined) {
this.textMaskInputElement.update(this.inputElement.value);
}
};
/**
* @return {?}
*/
NgxPhoneMaskDirective.prototype.onBlur = /**
* @return {?}
*/
function () {
this.onTouched();
};
/**
* @param {?} value
* @return {?}
*/
NgxPhoneMaskDirective.prototype.writeValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
this._setupMask();
// set the initial value for cases where the mask is disabled
/** @type {?} */
var normalizedValue = value == null ? '' : value;
this._renderer.setProperty(this.inputElement, 'value', normalizedValue);
if (this.textMaskInputElement !== undefined) {
this.textMaskInputElement.update(value);
}
};
/**
* @param {?} fn
* @return {?}
*/
NgxPhoneMaskDirective.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NgxPhoneMaskDirective.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onTouched = fn;
};
/**
* @param {?} isDisabled
* @return {?}
*/
NgxPhoneMaskDirective.prototype.setDisabledState = /**
* @param {?} isDisabled
* @return {?}
*/
function (isDisabled) {
this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
};
/**
* @param {?} value
* @return {?}
*/
NgxPhoneMaskDirective.prototype._handleInput = /**
* @param {?} value
* @return {?}
*/
function (value) {
if (!this._compositionMode || (this._compositionMode && !this._composing)) {
this._setupMask();
if (this.textMaskInputElement !== undefined) {
this.textMaskInputElement.update(value);
// get the updated value
value = this.inputElement.value;
if (this.clean) {
this.onChange(clean(value));
}
else {
this.onChange(value);
}
}
}
};
/**
* @param {?=} create
* @return {?}
*/
NgxPhoneMaskDirective.prototype._setupMask = /**
* @param {?=} create
* @return {?}
*/
function (create) {
if (create === void 0) {
create = false;
}
if (!this.inputElement) {
if (this._elementRef.nativeElement.tagName.toUpperCase() === 'INPUT') {
// `textMask` directive is used directly on an input element
this.inputElement = this._elementRef.nativeElement;
}
else {
// `textMask` directive is used on an abstracted input element, `md-input-container`, etc
this.inputElement = this._elementRef.nativeElement.getElementsByTagName('INPUT')[0];
}
}
if (this.inputElement && create) {
this.textMaskInputElement = textMaskCore.createTextMaskInputElement(Object.assign({ inputElement: this.inputElement }, this.textMaskConfig));
}
};
/**
* @return {?}
*/
NgxPhoneMaskDirective.prototype._compositionStart = /**
* @return {?}
*/
function () {
this._composing = true;
};
/**
* @param {?} value
* @return {?}
*/
NgxPhoneMaskDirective.prototype._compositionEnd = /**
* @param {?} value
* @return {?}
*/
function (value) {
this._composing = false;
this._compositionMode && this._handleInput(value);
};
NgxPhoneMaskDirective.decorators = [
{ type: core.Directive, args: [{
host: {
'(input)': '_handleInput($event.target.value)',
'(blur)': 'onTouched()',
'(compositionstart)': '_compositionStart()',
'(compositionend)': '_compositionEnd($event.target.value)'
},
selector: '[ngxPhoneMask]',
exportAs: 'ngxPhoneMask',
providers: [{
provide: forms.NG_VALUE_ACCESSOR,
useExisting: core.forwardRef(function () { return NgxPhoneMaskDirective; }),
multi: true
}]
},] }
];
/** @nocollapse */
NgxPhoneMaskDirective.ctorParameters = function () {
return [
{ type: core.Renderer2 },
{ type: core.ElementRef },
{ type: Boolean, decorators: [{ type: core.Optional }, { type: core.Inject, args: [forms.COMPOSITION_BUFFER_MODE,] }] }
];
};
NgxPhoneMaskDirective.propDecorators = {
clean: [{ type: core.Input }],
onBlur: [{ type: core.HostListener, args: ['blur',] }]
};
return NgxPhoneMaskDirective;
}());
/**
* @param {?} value
* @return {?}
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
*/
NgxPhoneMaskDirective.prototype.writeValue = function (value) {
this.value = value;
};
var NgxPhoneMaskModule = /** @class */ (function () {
function NgxPhoneMaskModule() {
}
NgxPhoneMaskModule.decorators = [
{ type: core.NgModule, args: [{
imports: [angular2TextMask.TextMaskModule],
declarations: [NgxPhoneMaskDirective],
exports: [NgxPhoneMaskDirective]
},] }
];
return NgxPhoneMaskModule;
}());
/**
* @param {?} fn
* @return {?}
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
*/
NgxPhoneMaskDirective.prototype.registerOnChange = function (fn) {
this.onChangeCallback = fn;
};
/**
* @param {?} fn
* @return {?}
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
*/
NgxPhoneMaskDirective.prototype.registerOnTouched = function (fn) {
this.onTouchedCallback = fn;
};
/**
* @param {?} isDisabled
* @return {?}
*/
NgxPhoneMaskDirective.prototype.setDisabledState = function (isDisabled) {
this.disabled = isDisabled;
};
return NgxPhoneMaskDirective;
}());
NgxPhoneMaskDirective.decorators = [
{ type: core.Directive, args: [{
selector: '[ngxPhoneMask]',
providers: [
{
provide: forms.NG_VALUE_ACCESSOR,
useExisting: core.forwardRef(function () { return NgxPhoneMaskDirective; }),
multi: true
}
]
},] },
];
/**
* @nocollapse
*/
NgxPhoneMaskDirective.ctorParameters = function () { return [
{ type: core.ElementRef, },
]; };
NgxPhoneMaskDirective.propDecorators = {
'valueType': [{ type: core.Input },],
'showMask': [{ type: core.Input },],
'onInput': [{ type: core.HostListener, args: ['input',] },],
};
var NgxPhoneMaskModule = (function () {
function NgxPhoneMaskModule() {
}
return NgxPhoneMaskModule;
}());
NgxPhoneMaskModule.decorators = [
{ type: core.NgModule, args: [{
imports: [
common.CommonModule
],
declarations: [NgxPhoneMaskDirective],
exports: [NgxPhoneMaskDirective]
},] },
];
/**
* @nocollapse
*/
NgxPhoneMaskModule.ctorParameters = function () { return []; };
exports.NgxPhoneMaskModule = NgxPhoneMaskModule;
exports.ɵa = NgxPhoneMaskDirective;
exports.TextMaskConfig = TextMaskConfig;
exports.NgxPhoneMaskDirective = NgxPhoneMaskDirective;
exports.NgxPhoneMaskModule = NgxPhoneMaskModule;
Object.defineProperty(exports, '__esModule', { value: true });
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=ngx-phone-mask.umd.js.map
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXBob25lLW1hc2sudW1kLmpzLm1hcCIsInNvdXJjZXMiOlsibmc6Ly9uZ3gtcGhvbmUtbWFzay9saWIvbmd4LXBob25lLW1hc2suZGlyZWN0aXZlLnRzIiwibmc6Ly9uZ3gtcGhvbmUtbWFzay9saWIvbmd4LXBob25lLW1hc2subW9kdWxlLnRzIl0sInNvdXJjZXNDb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","version":3,"metadata":{"NgxPhoneMaskModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","name":"ɵa"}],"exports":[{"__symbolic":"reference","name":"ɵa"}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[ngxPhoneMask]","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"ɵa"},"multi":true}]}]}],"members":{"valueType":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"showMask":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"updateInputView":[{"__symbolic":"method"}],"emitValue":[{"__symbolic":"method"}],"onInput":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["input"]}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}]}}},"origins":{"NgxPhoneMaskModule":"./src/app/ngx-phone-mask/ngx-phone-mask.module","ɵa":"./src/app/ngx-phone-mask/ngx-phone-mask.directive"},"importAs":"ngx-phone-mask"}
{"__symbolic":"module","version":4,"metadata":{"TextMaskConfig":{"__symbolic":"class","members":{}},"NgxPhoneMaskDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":38,"character":1},"arguments":[{"host":{"(input)":"_handleInput($event.target.value)","(blur)":"onTouched()","(compositionstart)":"_compositionStart()","(compositionend)":"_compositionEnd($event.target.value)","$quoted$":["(input)","(blur)","(compositionstart)","(compositionend)"]},"selector":"[ngxPhoneMask]","exportAs":"ngxPhoneMask","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":48,"character":11},"useExisting":{"__symbolic":"reference","name":"NgxPhoneMaskDirective"},"multi":true}]}]}],"members":{"clean":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":54,"character":2}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":78,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":78,"character":15},"arguments":[{"__symbolic":"reference","module":"@angular/forms","name":"COMPOSITION_BUFFER_MODE","line":78,"character":22}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":76,"character":21},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":77,"character":23},{"__symbolic":"reference","name":"boolean"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"onBlur":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":99,"character":2},"arguments":["blur"]}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}],"_handleInput":[{"__symbolic":"method"}],"_setupMask":[{"__symbolic":"method"}],"_compositionStart":[{"__symbolic":"method"}],"_compositionEnd":[{"__symbolic":"method"}]}},"NgxPhoneMaskModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":4,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"angular2-text-mask","name":"TextMaskModule","line":5,"character":11}],"declarations":[{"__symbolic":"reference","name":"NgxPhoneMaskDirective"}],"exports":[{"__symbolic":"reference","name":"NgxPhoneMaskDirective"}]}]}],"members":{}}},"origins":{"TextMaskConfig":"./lib/ngx-phone-mask.directive","NgxPhoneMaskDirective":"./lib/ngx-phone-mask.directive","NgxPhoneMaskModule":"./lib/ngx-phone-mask.module"},"importAs":"ngx-phone-mask"}
{
"name": "ngx-phone-mask",
"version": "2.1.3",
"license": "ISC",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng-packagr -p ng-package.json",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"repository": {
"type": "git",
"url": "https://github.com/Ledzz/ngx-phone-mask.git"
},
"bugs": {
"web": "https://github.com/Ledzz/ngx-phone-mask/issues"
},
"keywords": [
"angular",
"angular2",
"angular4",
"directive",
"mask",
"phone",
"number",
"ng-model",
"form-control",
"masking",
"international"
],
"author": "Ledzz",
"version": "3.0.0",
"peerDependencies": {
"@angular/common": ">=4.0.0",
"@angular/compiler": ">=4.0.0",
"@angular/core": ">=4.0.0",
"@angular/forms": ">=4.0.0",
"@angular/platform-browser": ">=4.0.0",
"@angular/platform-browser-dynamic": ">=4.0.0",
"core-js": "^2.4.1",
"rxjs": "^5.1.0",
"zone.js": "^0.8.4"
"@angular/common": "^6.0.0-rc.0 || ^6.0.0",
"@angular/core": "^6.0.0-rc.0 || ^6.0.0",
"angular2-text-mask": "^9.0.0"
},
"devDependencies": {
"@angular/cli": "1.2.0",
"@angular/compiler-cli": ">=4.0.0",
"@types/node": "~6.0.60",
"codelyzer": "~3.0.1",
"ng-packagr": "^1.2.0",
"ts-node": "~3.0.4",
"tslint": "~5.3.2",
"typescript": "~2.3.3"
},
"main": "bundles/ngx-phone-mask.umd.js",
"module": "ngx-phone-mask/ngx-phone-mask.es5.js",
"es2015": "ngx-phone-mask/ngx-phone-mask.js",
"typings": "ngx-phone-mask.d.ts"
}
"module": "fesm5/ngx-phone-mask.js",
"es2015": "fesm2015/ngx-phone-mask.js",
"esm5": "esm5/ngx-phone-mask.js",
"esm2015": "esm2015/ngx-phone-mask.js",
"fesm5": "fesm5/ngx-phone-mask.js",
"fesm2015": "fesm2015/ngx-phone-mask.js",
"typings": "ngx-phone-mask.d.ts",
"metadata": "ngx-phone-mask.metadata.json",
"sideEffects": false,
"dependencies": {
"tslib": "^1.9.0"
}
}

@@ -1,1 +0,2 @@

export * from './src/app/ngx-phone-mask/ngx-phone-mask.module';
export * from './lib/ngx-phone-mask.directive';
export * from './lib/ngx-phone-mask.module';

@@ -1,10 +0,20 @@

# NgxPhoneMask
# NgxPhoneMask ![pipeline status](https://gitlab.com/Ledzz/ngx-phone-mask/badges/master/pipeline.svg)
Angular directive for autoformatting international phone numbers.
Angular directive for autoformatting phone numbers. Compatible with Angular 7.
Currently doesn't support phone numbers with lengths other than 11. (`+7 (987) 123-45-67`)
[Demo](https://ngx-phone-mask.surge.sh/)
## Usage
This libs rely on text-mask, so you need to install it.
Install via npm:
```shell
npm install ngx-phone-mask
npm install ngx-phone-mask angular2-text-mask
```
or yarn:
```shell
yarn add ngx-phone-mask angular2-text-mask
```

@@ -32,4 +42,3 @@ Import in your `app.module.ts`:

## Config
You can set `valueType` to `'clean'`, `'raw'` or `'full'` to change output format.
Default is `'clean'`.
You can set `clean` to `false` if you want formatted value in model.
```html

@@ -43,8 +52,8 @@ <input ngxPhoneMask [(ngModel)]='yourModelName' valueType='full'>

To publish:
```
git commit
npm version patch
npm run build
npm publish dist
```
## Contributing
Please feel free to leave your PRs, issues, feature requests.
## Upcoming features
- [ ] Support other phone lengths
- [ ] Return country when recognized
- [ ] Tests

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc