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

felixriddle.my-types

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

felixriddle.my-types - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

34

dist/index.d.ts

@@ -18,2 +18,34 @@ /**

/**
* For easier handling of the status object
*/
declare class StatusWrapper {
status: Status;
constructor(status: Status);
/**
* Get the object
*/
get(): Status;
/**
* Check if the object is just using default values
*
* @returns {bool}
*/
isDefault(): boolean;
/**
* Set this object as an error and give it a message
*
* @param {string} field The field name for example 'email', 'password'
* @param {string} message The field message for example 'Email not given'
*/
static newError(field: FieldType, message: string): Status;
/**
* Set this object as a success
*
* @param {string} field The field name for example 'email', 'password'
* @param {string} message The field message for example 'Email Ok'
*/
static newSuccess(field: FieldType, message: string): Status;
}
interface DeleteUserResultType {

@@ -183,2 +215,2 @@ userDeleted: boolean;

export type { BackdoorConfirmEmailInputType, BackdoorConfirmEmailResultType, CategoryType, CompleteUserData, CreateUserPropertyInputType, CreateUserPropertyResultType, DataResultType, DebugMessage, DebugPropertyImageUploadType, DeleteUserPropertyResultType, DeleteUserResultType, FieldStatusType, LoginGetJwtResultType, MyPropertiesPageResultType, PriceType, PropertyCompleteType, PropertyType, Status };
export { type BackdoorConfirmEmailInputType, type BackdoorConfirmEmailResultType, type CategoryType, type CompleteUserData, type CreateUserPropertyInputType, type CreateUserPropertyResultType, type DataResultType, type DebugMessage, type DebugPropertyImageUploadType, type DeleteUserPropertyResultType, type DeleteUserResultType, type FieldStatusType, type LoginGetJwtResultType, type MyPropertiesPageResultType, type PriceType, type PropertyCompleteType, type PropertyType, type Status, StatusWrapper };

@@ -6,2 +6,6 @@ "use strict";

var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {

@@ -19,3 +23,62 @@ if (from && typeof from === "object" || typeof from === "function") {

var src_exports = {};
__export(src_exports, {
StatusWrapper: () => StatusWrapper
});
module.exports = __toCommonJS(src_exports);
// src/lib/StatusWrapper.ts
var StatusWrapper = class {
constructor(status) {
this.status = status;
}
/**
* Get the object
*/
get() {
return this.status;
}
/**
* Check if the object is just using default values
*
* @returns {bool}
*/
isDefault() {
if (!this.status.error && this.status.message.length === 0) {
return true;
}
return false;
}
/**
* Set this object as an error and give it a message
*
* @param {string} field The field name for example 'email', 'password'
* @param {string} message The field message for example 'Email not given'
*/
static newError(field, message) {
const status = {
error: true,
field,
message
};
return status;
}
/**
* Set this object as a success
*
* @param {string} field The field name for example 'email', 'password'
* @param {string} message The field message for example 'Email Ok'
*/
static newSuccess(field, message) {
const status = {
error: false,
field,
message
};
return status;
}
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
StatusWrapper
});
//# sourceMappingURL=index.js.map

2

package.json
{
"name": "felixriddle.my-types",
"version": "1.0.0",
"version": "1.0.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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