Giter Club home page Giter Club logo

enofjs's People

Contributors

enof avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

dominikkukacka

enofjs's Issues

auto generated is and isSet

this.private = {
  foo: {
    is: false
  },
  bar: {
    isSet: true
  }
} 

will generate

this.public = {
  isFoo: function generatedIs(){
    return this.private.foo;
  },
  isBar: function generatedIs(){
    return this.private.bar;
  },
  setBar: function generatedSet(value){
    this.private.bar = value;
  }
}

Delete Last

AS a developer
WHAT delete the last entry
WHY to easily delete the last entry of an LinkedHashList

GIVEN
A LinkedHashList is initialized
The List has 3 entries

WHEN
Deleting the last entry

THEN
The last entry should be the second entry of the initial list
The last entry should return null when getting the next node

super is not passed down for an already extended class

GIVEN
Cat extends Animal
Cat.constructor calls Animal.constructor
Kitten extends Cat
Kitten.constructor calls Cat.constructor

WHEN
Kitten is initialized

THEN
Kitten should have called the constructor of Cat and Animal

ie8 issue with super keyword

ie8 has super keyword reserved and breaks, to make it compatible and also prevent issues with possible future updates from other browsers implementing super, the super keyword will be renamed to sup.

Getting the last entry

AS a developer
WHAT retrieve the last entry
WHY to easily retrieve the last entry of an LinkedHashList

GIVEN
A LinkedHashList is initialized
The List has 3 entries

WHEN
Getting the last entry

THEN
returns the last entry of the list
the last entry should return null when getting next

Introduce LinkedHashMap

AS a developer
WHAT use a LinkedHashMap
WHY so I can remove entries and add entries easily

get by id(hash)

AS a developer
WHAT get a node by id(hash)
WHY to easily get a node by position

GIVEN
A LinkedHashList is initialized
The List has 3 entries

WHEN
Get the second node by id

THEN
The second node should be returned

nodes should have a reference to each other

AS a developer
WHAT node should have a reference to nodes next to it
WHY to easily get the node next to it

GIVEN
A LinkedHashList is initialized
The List has 3 entries

WHEN
Get the second node by id

THEN
the second node should have a reference to previous and next

Getting the first entry

AS a developer
WHAT retrieve the first entry
WHY to easily retrieve the first entry of an LinkedHashList

GIVEN
A LinkedHashList is initialized
The List has 3 entries

WHEN
Getting the first entry

THEN
returns the first entry of the list
the first entry should return null when getting previous

Override protected

GIVEN
Cat -> lick throws new Error
Cat -> affect calls lick
Kitten -> lick returns 'LICK'
WHEN
Kitten calls affect
THEN
Kitten -> affect returns LICK

whereIt

AS a developer
WHAT write a test with configurable variables and expectations
WHY to reuse a test easily

Delete First

AS a developer
WHAT delete the first entry
WHY to easily delete the first entry of an LinkedHashList

GIVEN
A LinkedHashList is initialized
The List has 3 entries

WHEN
Deleting the first entry

THEN
The first entry should be the 2nd entry in the list
The first entry should return null

Add entry to the first of the list

AS a developer
WHAT add an entry to the list at the first position
WHY to easily add an new entry at the first position without handling reordering

GIVEN
A LinkedHashList is initialized
The List has 3 entries

WHEN
Adding an entry to the first of the list

THEN
The first entry should be the newly added node
The first entry should have the previously first node as next
The first entry should have null as previous

Add an entry

AS a developer
WHAT add an entry
WHY to easily add an entry to an LinkedHashList

GIVEN
A LinkedHashList is initialized
The List has 3 entries

WHEN
Adding a new entry

THEN
The new entry should be the last entry
The last entry should have null as next
The previous last entry shoul have the new entry as next

Delete middle

AS a developer
WHAT delete an entry in the middle of the list
WHY to easily remove an node in between a list

GIVEN
A LinkedHashList is initialized
The List has 3 entries

WHEN
Removing the second entry

THEN
The first entry should have the last entry on the next node
The last entry should have the first entry on the previous node

Add before

AS a developer
WHAT add before a node
WHY to easily add an new entry before a node reference

GIVEN
A LinkedHashList is initialized
The List has 3 entries

WHEN
Adding before the second node

THEN
The added node should be between the first and second node

Add after

AS a developer
WHAT add after a node
WHY to easily add an new entry after a node reference

GIVEN
A LinkedHashList is initialized
The List has 3 entries

WHEN
Adding after the second node

THEN
The added node should be between the second and last node

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.