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

@expo/account-names

Package Overview
Dependencies
Maintainers
21
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expo/account-names - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

2

build/names.d.ts

@@ -8,2 +8,4 @@ export declare enum NameValidationErrorCode {

}
export declare const minimumAccountNameLength = 3;
export declare const maximumAccountNameLength = 128;
/**

@@ -10,0 +12,0 @@ * Asserts that the given account name or username is valid and throws an error with a descriptive

14

build/names.js
"use strict";
exports.__esModule = true;
exports.validateAccountName = exports.enforceValidAccountName = exports.NameValidationErrorCode = void 0;
exports.validateAccountName = exports.enforceValidAccountName = exports.maximumAccountNameLength = exports.minimumAccountNameLength = exports.NameValidationErrorCode = void 0;
var NameValidationErrorCode;

@@ -12,4 +12,4 @@ (function (NameValidationErrorCode) {

})(NameValidationErrorCode = exports.NameValidationErrorCode || (exports.NameValidationErrorCode = {}));
var minLength = 3;
var maxLength = 128;
exports.minimumAccountNameLength = 3;
exports.maximumAccountNameLength = 128;
var regex = /^[a-z0-9]([._-]?[a-z0-9])*(?![._-]$)$/i;

@@ -41,6 +41,6 @@ /**

case NameValidationErrorCode.TOO_SHORT:
error = new Error("Account names must be at least " + minLength + " characters");
error = new Error("Account names must be at least " + exports.minimumAccountNameLength + " characters");
break;
case NameValidationErrorCode.TOO_LONG:
error = new Error("Account names must be under " + maxLength + " characters");
error = new Error("Account names must be under " + exports.maximumAccountNameLength + " characters");
break;

@@ -65,6 +65,6 @@ default:

}
if (name.length < minLength) {
if (name.length < exports.minimumAccountNameLength) {
return NameValidationErrorCode.TOO_SHORT;
}
if (name.length >= maxLength) {
if (name.length >= exports.maximumAccountNameLength) {
return NameValidationErrorCode.TOO_LONG;

@@ -71,0 +71,0 @@ }

{
"name": "@expo/account-names",
"version": "1.0.0",
"version": "1.1.0",
"description": "A validation library for Expo account names",

@@ -5,0 +5,0 @@ "main": "build/names.js",

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