atom-smasher

1.3.0 • Public • Published

atom-smasher

Reduce a list of uuid tagged objects into a single writable (es6 class) object.

Note: 'uuid','version', 'tags' are reserved for atom control Note: list is reserved for fetching source records

const input = [
  { uuid: 'a', title: 'Foobar' },
  { uuid: 'b', author: 'Alice' },
];

Plain_Test : {
  const actual = program.make(input);
  const expected = {
    title: 'Foobar',
    author: 'Alice',
  };
  assert.deepEqual( actual , expected );
}

Updating_Property_Test : {
  const actual = program.make(input);
  actual.title = 'Wonderland';
  const expected = {
    title: 'Wonderland',
    author: 'Alice',
  };
  assert.deepEqual( actual , expected );
}

Get_DataList_Test : {
  const actual = program.make(input);
  actual.title = 'Wonderland';
  const expected = [ { uuid: 'a', title: 'Wonderland' }, { uuid: 'b', author: 'Alice' } ];
  assert.deepEqual( actual.list , expected );
}

Readme

Keywords

none

Package Sidebar

Install

npm i atom-smasher

Weekly Downloads

2

Version

1.3.0

License

ISC

Unpacked Size

36.3 kB

Total Files

5

Last publish

Collaborators

  • fantasyui.com