Laminar
  • Laminar
  • Platform
    • Overview
    • Getting Started
    • Advanced
      • Workflows
        • Global Workflow Object
        • HTTP Request Batching
        • Workflow Exit Points
        • Invoke Secondary Workflows
      • Configurations
      • Flows
        • Flow Types
          • HTTP Request
          • Data Transformations
        • Supported Languages
      • Managing Notifications
    • Best Practices
    • Keywords
      • lam.resolveThenExecute
      • lam.exit
      • lam.execute
      • lam.asyncExecute
      • lam.httpRequest
      • lam.httpRequests
  • API
    • Executing a Workflow
    • Creating a Configuration
    • Authentication
    • Changelog
  • External Links
    • Book a Demo
    • Sign In
Powered by GitBook
On this page
  • Python
  • JavaScript
  • Available JavaScript Imports

Was this helpful?

  1. Platform
  2. Advanced
  3. Flows

Supported Languages

Learn about the languages supported by Laminar

Our platform currently supports two programming languages for data transformations:

Python

When using Python, write your code as a function:

def functionName(data):
    # Your flow logic here
    return result

JavaScript

When using JavaScript, write your code as a named lambda function:

(data) => {
    // Your flow logic here
    return result
}

Available JavaScript Imports

The following libraries can be used directly when using JavaScript to edit flows without requiring additional import statements.

  • lodash (as _)

(data) => {
    // Group users by role
    const groupedUsers = _.groupBy(data.input.users, 'role');
    
    // Get only active users
    const activeUsers = _.filter(data.input.users, {isActive: true});
    
    return {
        groupedUsers,
        activeUsers
    };
}
  • date-fns: { format, parseISO }

(data) => {
    // Format dates in a user-friendly way
    const formattedUsers = data.users.map(user => ({
        ...user,
        joinedDate: format(parseISO(user.joinedAt), 'MMM dd, yyyy')
    }));
    
    return formattedUsers;
}

PreviousData TransformationsNextManaging Notifications

Last updated 1 month ago

Was this helpful?