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

lambda-expression

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lambda-expression

Utility to analyze function (js) and arrow functions (ts), and create metadata of expressions, the initial scope is that it seeks to solve simple expressions. And later advance to encompass complex expressions.

  • 0.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.9K
increased by283.24%
Maintainers
1
Weekly downloads
 
Created
Source

npm version

lambda-expression

Utility to analyze function (js) and arrow functions (ts), and create metadata of expressions, the initial scope is that it seeks to solve simple expressions. And later advance to encompass complex expressions.

Created use to Typescript

Usage

First, install the package using npm:

npm install lambda-expression --save

In Typescript:

import { ExpressionUtils, Expression } from "lambda-expression";

export class ExpressionUsage {

    private readonly _expressionUtils: ExpressionUtils;

    constructor() {
        this._expressionUtils = new ExpressionUtils();
    }

    public expression<T>(exp: Expression<T>){
        console.log(this._expressionUtils.getColumnByExpression(exp));
    }

    public test(){
        this.expression<ModelTest>(x => x.id); // id
        this.expression<ModelTest>(x => x.description); // description
        this.expression<ModelTest>(x => x.date); // date
        this.expression<ModelTest>(x => x.isValid); // isValid
        this.expression<ModelTest>(x => x.reference.name); // reference_name
    }
}

class ModelTest{
    id: number;
    name: string;
    description: string;
    date: Date;
    isValid: boolean;
    reference: ReferencesModelTest;
}

class ReferencesModelTest{
    id: number;
    name: string;
}

License

Apache 2.0

Keywords

FAQs

Package last updated on 06 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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