42acx7rew 

42acx7rew 


Output:

<Buffer 5b 7b 22 6e 61 6d 65 22 3a 22 6f 62 6a 65 63 74 31 22 2c 22 69 64 22 3a 22 31 22 2c 22 74 69 6d 65 73 65 72 69 65 73 44 61 74 61 22 3a 5b 5b 31 35 34 ... 305 more bytes>
chunks length 256
chunks[0]- <Buffer 5b 7b 22 6e 61 6d 65 22 3a 22 6f 62 6a 65 63 74 31 22 2c 22 69 64 22 3a 22 31 22 2c 22 74 69 6d>
[
  {
    name: 'object1',
    id: '1',
    timeseriesData: [ [Array], [Array], [Array], [Array], [Array], [Array] ]
  },
  {
    name: 'object2',
    id: '2',
    timeseriesData: [ [Array], [Array], [Array], [Array], [Array], [Array] ]
  }
]
converted length 256
result1 [
  {
    type: 'Buffer',
    data: [
      91, 123,  34, 110,  97, 109, 101,  34,
      58,  34, 111,  98, 106, 101,  99, 116,
      49,  34,  44,  34, 105, 100,  34,  58,
      34,  49,  34,  44,  34, 116, 105, 109
    ]
  },
  {
    type: 'Buffer',
    data: [
      101, 115, 101, 114, 105, 101, 115, 68,
       97, 116,  97,  34,  58,  91,  91, 49,
       53,  52,  56,  57,  55,  57,  50, 48,
       48,  48,  48,  48,  44,  51,  50, 53
    ]
  },
  {
    type: 'Buffer',
    data: [
      46, 51, 93, 44, 91, 49, 53, 52, 56,
      57, 55, 57, 50, 54, 48, 48, 48, 48,
      44, 51, 50, 53, 46, 56, 93, 44, 91,
      49, 53, 52, 56, 57
    ]
  },
  {
    type: 'Buffer',
    data: [
      55, 57, 51, 50, 48, 48, 48, 48, 44,
      51, 50, 52, 46, 50, 93, 44, 91, 49,
      53, 52, 56, 57, 55, 57, 51, 56, 48,
      48, 48, 48, 44, 51
    ]
  },
  {
    type: 'Buffer',
    data: [
      50, 51, 46, 55, 93, 44, 91, 49, 53,
      52, 56, 57, 55, 57, 52, 52, 48, 48,
      48, 48, 44, 51, 50, 50, 46, 51, 93,
      44, 91, 49, 53, 52
    ]
  },
  {
    type: 'Buffer',
    data: [
       56, 57,  55,  57,  53,  48,  48,  48,
       48, 48,  44,  51,  50,  50,  93,  93,
      125, 44, 123,  34, 110,  97, 109, 101,
       34, 58,  34, 111,  98, 106, 101,  99
    ]
  },
  {
    type: 'Buffer',
    data: [
      116,  50,  34,  44,  34, 105, 100,  34,
       58,  34,  50,  34,  44,  34, 116, 105,
      109, 101, 115, 101, 114, 105, 101, 115,
       68,  97, 116,  97,  34,  58,  91,  91
    ]
  },
  {
    type: 'Buffer',
    data: [
      49, 53, 52, 56, 57, 56, 57, 50, 48,
      48, 48, 48, 48, 44, 54, 50, 53, 46,
      51, 93, 44, 91, 49, 53, 52, 56, 57,
      56, 57, 50, 54, 48
    ]
  },
  {
    type: 'Buffer',
    data: [
      48, 48, 48, 44, 54, 50, 53, 46, 56,
      93, 44, 91, 49, 53, 52, 56, 57, 56,
      57, 51, 50, 48, 48, 48, 48, 44, 54,
      50, 52, 46, 50, 93
    ]
  },
  {
    type: 'Buffer',
    data: [
      44, 91, 49, 53, 52, 56, 57, 56, 57,
      51, 56, 48, 48, 48, 48, 44, 54, 50,
      51, 46, 55, 93, 44, 91, 49, 53, 52,
      56, 57, 56, 57, 52
    ]
  },
  {
    type: 'Buffer',
    data: [
      52, 48, 48, 48, 48, 44, 54, 50, 50,
      46, 51, 93, 44, 91, 49, 53, 52, 56,
      57, 56, 57, 53, 48, 48, 48, 48, 48,
      44, 54, 50, 50, 93
    ]
  },
  { type: 'Buffer', data: [ 93, 125, 93 ] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  { type: 'Buffer', data: [] },
  ... 156 more items
]

node:buffer:560
      throw new ERR_INVALID_ARG_TYPE(
      ^

TypeError [ERR_INVALID_ARG_TYPE]: The "list[0]" argument must be an instance of Buffer or Uint8Array. Received an instance of Object
    at new NodeError (node:internal/errors:371:5)
    at Function.concat (node:buffer:560:13)
    at Object.<anonymous> (/index.js:99:31)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'ERR_INVALID_ARG_TYPE'
}

NodeJS Online Compiler

Write, Run & Share NodeJS code online using OneCompiler's NodeJS online compiler for free. It's one of the robust, feature-rich online compilers for NodeJS language,running on the latest LTS version NodeJS 16.14.2. Getting started with the OneCompiler's NodeJS editor is easy and fast. The editor shows sample boilerplate code when you choose language as NodeJS and start coding. You can provide the dependencies in package.json.

About NodeJS

Node.js is a free and open-source server environment. Node.js is very popular in recent times and a large number of companies like Microsoft, Paypal, Uber, Yahoo, General Electric and many others are using Node.js.

Key features

  • Built on Google chrome's javascript engine V8 and is pretty fast.
  • Node.js was developed by Ryan Dahl in 2009.
  • Server-side platform for building fast and scalable applications.
  • Node.js is Asynchronous, event-driven and works on single-thread model thus eliminating the dis-advantages of multi-thread model.
  • Supports various platforms like Windows, Linux, MacOS etc.
  • Provides rich library of java script modules which simplifies the development efforts.
  • Released under MIT license.

Express Framework

Express is one of the most popular web application framework in the NodeJS echosystem.

  • Pretty fast
  • Minimalist
  • Unopinionated
  • Very flexible

Syntax help

Examples

Using Moment

let moment = require('moment');

console.log(moment().format('MMMM Do YYYY, h:mm:ss a'));

Using Lodash

const _ = require("lodash");

let colors = ['blue', 'green', 'yellow', 'red'];

let firstElement = _.first(colors);
let lastElement = _.last(colors);

console.log(`First element: ${firstElement}`);
console.log(`Last element: ${lastElement}`);

Libraries supported

Following are the libraries supported by OneCompiler's NodeJS compiler.

  • lodash
  • moment
  • underscore
  • uuid
  • ejs
  • md5
  • url