Skip to content

fantasyui-com/atom-smasher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 );
}

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published