question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Move NodeJS API into it’s own issue. First mentioned in PR #284


We should aim to be able to export specific modules from the CyberChef package so that the 200+ operations can be used effectively in other projects.

An example (exact API still open to suggestions):

import { base64, base32 } from "cyberchef";

base64.from("SGVsbG8sIFdvcmxkIQ==");
base32.to("some input");

Also working with commonJS require.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
d98762625commented, Apr 20, 2018

We can also support a callback API, adding flexibility. See example (taken from a Google example):

/**
 * Create and send request to Google API
 * @param parameters Parameters used to form request
 * @param callback   Callback when request finished or error found
 */

export function createAPIRequest(parameters, callback) {
  if (callback) {
    createAPIRequestAsync(parameters)
        .then(r => callback(null, r))
        .catch(e => callback(e));
  } else {
    return createAPIRequestAsync(parameters);
  }
}
1reaction
d98762625commented, Apr 13, 2018

@n1474335 I agree with you on the per-operation API. I don’t think there’s much benefit in grouping operations (base32.from, base32.to) - especially for the amount of extra it adds in manually declaring the relationships.

I like the info and search - I will play around with those.

@artemisbot async functions return promises anyway, so can use the promise syntax with these if you don’t want to use async/await.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.js API
No information is available for this page.
Read more >
Node.js - RESTful API - Tutorialspoint
Node.js - RESTful API, REST stands for REpresentational State Transfer. REST is web standards based architecture and uses HTTP Protocol.
Read more >
Creating a Secure Node.js REST API - Toptal
REST APIs are so useful and ubiquitous that every web developer should know how to build them. Here's how to build a Node.js...
Read more >
How to Build REST API with Node.js from Scratch - Edureka
This article on Building a REST API with Node.js will give you a step by step demostration for creating a CRUD application using...
Read more >
What is REST API in Node.js ? - GeeksforGeeks
The API (Application Programming Interface) is a set of commands, functions, or protocols that act as an intermediary that enables two ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found