You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@leafer/data

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafer/data - npm Package Compare versions

Comparing version
1.0.0-rc.5
to
1.0.0-rc.6
+2
-2
package.json
{
"name": "@leafer/data",
"version": "1.0.0-rc.5",
"version": "1.0.0-rc.6",
"description": "@leafer/data",

@@ -25,4 +25,4 @@ "author": "Chao (Leafer) Wan",

"devDependencies": {
"@leafer/interface": "1.0.0-rc.5"
"@leafer/interface": "1.0.0-rc.6"
}
}

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

import { ILeafData, ILeaf, IObject, __Value } from '@leafer/interface'
import { ILeafData, ILeafDataOptions, ILeaf, IObject, __Value } from '@leafer/interface'

@@ -44,12 +44,17 @@

public __getInputData(): IObject {
public __getInputData(options?: ILeafDataOptions): IObject {
const data: IObject = { tag: this.__leaf.tag }, { __input } = this
let realKey: string, value: __Value
for (let key in this) {
realKey = key.substring(1)
if ((this as any)[realKey] !== undefined) {
value = __input ? __input[realKey] : undefined
data[realKey] = value === undefined ? this[key] : value
if (options) {
for (let key in this) {
if (key[0] !== '_') data[key] = this[key]
}
} else {
let realKey: string, value: __Value
for (let key in this) {
realKey = key.substring(1)
if ((this as any)[realKey] !== undefined) {
value = __input ? __input[realKey] : undefined
data[realKey] = value === undefined ? this[key] : value
}
}
}

@@ -56,0 +61,0 @@ return data

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

import { IObject, ILeafData, ILeaf } from '@leafer/interface';
import { IObject, ILeafData, ILeaf, ILeafDataOptions } from '@leafer/interface';

@@ -22,3 +22,3 @@ declare const DataHelper: {

__removeInput(name: string): void;
__getInputData(): IObject;
__getInputData(options?: ILeafDataOptions): IObject;
__setMiddle(name: string, value: any): void;

@@ -25,0 +25,0 @@ __getMiddle(name: string): any;