Socket
Socket
Sign inDemoInstall

lincd-schema

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lincd-schema - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

1

lib/shapes/Person.d.ts

@@ -15,2 +15,3 @@ import { ShapeSet } from 'lincd/lib/collections/ShapeSet';

set birthDate(nativeDate: Date);
get age(): number;
get birthPlace(): string;

@@ -17,0 +18,0 @@ set birthPlace(val: string);

@@ -47,2 +47,14 @@ "use strict";

}
get age() {
if (this.hasProperty(schema_1.schema.birthDate) === false)
return null;
var today = new Date();
var birthDate = this.birthDate;
var age = today.getFullYear() - birthDate.getFullYear();
var m = today.getMonth() - birthDate.getMonth();
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
age--;
}
return age;
}
get birthPlace() {

@@ -49,0 +61,0 @@ return this.getValue(schema_1.schema.birthPlace);

2

package.json

@@ -5,3 +5,3 @@ {

"license": "UNLICENSED",
"version": "0.1.5",
"version": "0.1.6",
"lincd": true,

@@ -8,0 +8,0 @@ "author": {

@@ -65,2 +65,13 @@ import {XSDDate} from 'lincd-xsd/lib/shapes/XSDDate';

}
get age() {
if (this.hasProperty(schema.birthDate) === false) return null;
var today = new Date();
var birthDate = this.birthDate;
var age = today.getFullYear() - birthDate.getFullYear();
var m = today.getMonth() - birthDate.getMonth();
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
age--;
}
return age;
}

@@ -67,0 +78,0 @@ @literalProperty({

Sorry, the diff of this file is too big to display

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