1.54.0 • Published 2 years ago

@biorate/lifecycled v1.54.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Lifecircle

Decorators pack for bring lifecycle control in you application

Example:

import { lifecycled, init, kill } from '../../src';

class Uno {
  @init() public initialize() {
    console.log('Uno init');
  }

  @kill() public destructor() {
    console.log('Uno kill');
  }
}

class Dos {
  @init() public initialize() {
    console.log('Dos init');
  }

  @kill() public destructor() {
    console.log('Dos kill');
  }
}

class Tres {
  @init() public initialize() {
    console.log('Tres init');
  }

  @kill() public destructor() {
    console.log('Tres kill');
  }
}

class Root {
  uno = new Uno();
  dos = new Dos();
  tres = new Tres();
}

lifecycled(new Root());

// Uno init
// Dos init
// Tres init
// Uno kill
// Dos kill
// Tres kill

Learn

  • Documentation can be found here - docs.

Release History

See the CHANGELOG

License

MIT

Copyright (c) 2021-present Leonid Levkin (llevkin)

1.54.0

2 years ago

1.42.2

2 years ago

1.42.1

2 years ago

1.30.12

2 years ago

1.29.0

2 years ago

1.28.1

2 years ago

1.28.0

2 years ago

1.26.0

2 years ago

1.27.0

2 years ago

1.27.1

2 years ago

1.24.0

2 years ago

1.11.2

3 years ago

1.0.0

3 years ago

1.4.0

3 years ago

1.2.2

3 years ago

0.30.7

3 years ago

0.30.6

3 years ago

0.30.5

3 years ago

0.30.2

3 years ago

0.30.0

3 years ago

0.30.19

3 years ago

0.29.1

3 years ago

0.28.0

3 years ago

0.27.0

3 years ago

0.26.0

3 years ago

0.25.0

3 years ago

0.21.0

3 years ago

0.20.0

3 years ago

0.19.0

3 years ago

0.23.0

3 years ago

0.22.0

3 years ago

0.18.0

3 years ago

0.17.0

3 years ago

0.16.3

3 years ago

0.16.1

3 years ago

0.15.2

3 years ago

0.15.1

3 years ago

0.15.0

3 years ago

0.14.0

4 years ago

0.13.0

4 years ago

0.12.3

4 years ago

0.12.2

4 years ago

0.12.1

4 years ago

0.12.0

4 years ago