Coder Social home page Coder Social logo

bluse's Introduction

bluse

⚗️ blend and fuse data with ease

Npm Version Build Status Coverage Status Dependency Status devDependency Status npm npm

Installation

npm install bluse --save

Usage

To use bluse as a standalone library without a bundler, use the bundle located at dist/bluse.js. Else if you are using webpack or any other bundler, simply require('bluse') will suffice!

const bluse = require('bluse');

const data = [{
  builds: [{
    start: 1235,
    end: 12345,
    name: 'build1',
    steps: [{
      name: 'install',
      script: 'npm install',
      output: 'install successfully',
      dependencies: [
        '[email protected]',
        '[email protected]',
        '[email protected]'
      ],
      code: 0,
      start: 1,
      end: 34133
    }, {
      name: 'lint',
      script: 'npm run lint',
      output: 'failed lint!',
      code: 1,
      start: 2,
      end: 12
    }]
  }, {
    start: 1235,
    end: 12345,
    name: 'build2'
  }]
}, {
  builds: [{
    start: 1235,
    end: 12345,
    name: 'build3',
    steps: [{
      name: 'install',
      script: 'npm install',
      output: 'large outtttt',
      dependencies: [
        '[email protected]',
        '[email protected]',
        '[email protected]',
        '[email protected]'
      ],
      code: 0,
      start: 1,
      end: 34123
    }, {
      name: 'lint',
      script: 'npm run lint',
      output: 'large outtttt',
      code: 0,
      start: 2,
      end: 1256
    }, {
      name: 'coverage',
      script: 'npm run coverage',
      output: 'RUNNING COVERAAAGGEE',
      code: 0,
      start: 2,
      end: 123456
    }]
  }, {
    start: 1235,
    end: 12345,
    name: 'build4'
  }]
}];

bluse(data, { unique: true }); // the default is false

Now that you have blused your data! It should look like the following:

{
  'builds:start': [1235, 1235, 1235, 1235],
  'builds:end': [12345, 12345, 12345, 12345],
  'builds:name': ['build1', 'build2', 'build3', 'build4'],
  'builds:steps:name': ['install', 'lint', 'install', 'lint', 'coverage'],
  'builds:steps:script': ['npm install', 'npm run lint', 'npm install', 'npm run lint', 'npm run coverage'],
  'builds:steps:output': ['install successfully', 'failed lint!', 'large outtttt', 'large outtttt', 'RUNNING COVERAAAGGEE'],
  'builds:steps:dependencies': ['[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]'],
  'builds:steps:code': [0, 1, 0, 0, 0],
  'builds:steps:start': [1, 2, 1, 2, 2],
  'builds:steps:end': [34133, 12, 34123, 1256, 123456]
}

Contributions

bluse has been extensively tested with over 200,000 records and can hold up to the task! If you can break bluse please contribute back!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.