1.0.2 • Published 7 years ago

class-to-literal v1.0.2

Weekly downloads
9
License
-
Repository
-
Last release
7 years ago

Class to Literal

Copy all methods and properties from class object (and parents) to a new object literal.

Install

npm i class-to-literal

Usage

const classToLiteral = require('class-to-literal');
classToLiteral.convert(myClass);

Advanced

You can use conditions to put some propeties into another property.

classToLiteral.convert(myClass, [{
  condition: propertyValue => typeof propertyValue === 'function',
  destination: 'functions'
}]);
1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago