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

@ekzo-dev/toolkit

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ekzo-dev/toolkit - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

2

package.json
{
"name": "@ekzo-dev/toolkit",
"description": "Aurelia toolkit",
"version": "1.2.3",
"version": "1.2.4",
"homepage": "https://github.com/ekzo-dev/aurelia-components/tree/main/packages/toolkit",

@@ -6,0 +6,0 @@ "repository": {

@@ -5,4 +5,4 @@ import { valueConverter } from 'aurelia';

export class FormatBoolean {
toView(value, trueText = 'Да', falseText = 'Нет') {
if (value === undefined || value === null) return value;
toView(value: boolean | null | undefined, trueText = 'Да', falseText = 'Нет'): string | null | undefined {
if (value == null) return value as undefined;

@@ -9,0 +9,0 @@ return value ? trueText : falseText;

@@ -15,3 +15,3 @@ import { valueConverter } from 'aurelia';

toView(value, pattern, empty = null) {
toView(value, pattern, empty = null): string {
if (!value) return empty ?? value;

@@ -18,0 +18,0 @@ pattern = this.patterns[pattern] || pattern;

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

import type { JSONSchema7 } from 'json-schema';
import type { JSONSchema7, JSONSchema7Type } from 'json-schema';

@@ -12,6 +12,6 @@ import { valueConverter } from 'aurelia';

export class FormatJsonSchemaNode {
toView(value: any, definition: JSONSchema7) {
toView(value: JSONSchema7Type, definition: JSONSchema7) {
switch (definition.type) {
case 'boolean':
return new FormatBoolean().toView(value);
return new FormatBoolean().toView(value as boolean);

@@ -21,7 +21,4 @@ case 'string':

case 'integer':
if (
definition.enum &&
definition.anyOf?.every((item: JSONSchema7) => item.title != null && item.const != null)
) {
const node = definition.anyOf.find((item: JSONSchema7) => item.const === value);
if (definition.enum && definition.anyOf) {
const node = definition.anyOf[definition.enum.indexOf(value)];

@@ -42,6 +39,6 @@ if (node) {

case 'tel':
return new FormatPhone().toView(value);
return new FormatPhone().toView(value as string);
case 'filesize':
return new FormatFilesize().toView(value);
return new FormatFilesize().toView(value as number);
}

@@ -48,0 +45,0 @@ }

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