https://github.com/gabrielcsapo/bluse
⚗️ blend and fuse data with ease
https://github.com/gabrielcsapo/bluse
data normalize utility
Last synced: over 1 year ago
JSON representation
⚗️ blend and fuse data with ease
- Host: GitHub
- URL: https://github.com/gabrielcsapo/bluse
- Owner: gabrielcsapo
- Created: 2017-09-20T05:07:28.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-01-13T07:11:41.000Z (over 8 years ago)
- Last Synced: 2025-03-15T01:53:27.685Z (over 1 year ago)
- Topics: data, normalize, utility
- Language: JavaScript
- Homepage: https://gabrielcsapo.github.io/bluse
- Size: 884 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# bluse
> ⚗️ blend and fuse data with ease
[](https://www.npmjs.com/package/bluse)
[](https://travis-ci.org/gabrielcsapo/bluse)
[](https://lcov-server.gabrielcsapo.com/coverage/github%2Ecom/gabrielcsapo/bluse)
[](https://starbuck.gabrielcsapo.com/github/gabrielcsapo/bluse)
[](https://starbuck.gabrielcsapo.com/github/gabrielcsapo/bluse#info=devDependencies)
[](https://github.com/gabrielcsapo/bluse)
[](https://github.com/gabrielcsapo/bluse)
## 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!
```javascript
const bluse = require('bluse');
const data = [{
builds: [{
start: 1235,
end: 12345,
name: 'build1',
steps: [{
name: 'install',
script: 'npm install',
output: 'install successfully',
dependencies: [
'moment@1.0.2',
'kraken-js@2.0.1',
'tape@4.0.2'
],
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: [
'moment@2.0.2',
'kraken-js@2.0.1',
'tape@10.0.2',
'tap@11.0.2'
],
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:
```javascript
{
'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': ['moment@1.0.2', 'kraken-js@2.0.1', 'tape@4.0.2', 'moment@2.0.2', 'kraken-js@2.0.1', 'tape@10.0.2', 'tap@11.0.2'],
'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!