/Object-define

Define properties, getters, setters, and self-referencing values with a concise syntax

Primary LanguageJavaScript

Object.define

Define properties, getters, setters, and self-referencing values with a concise syntax

Features

Extend an object with getters and setters using a concise syntax
Define values that reference values or methods defined later in the chain
Define getters and setters in any order
Define methods that run only once

Useful for defining properties for Angular's $scope
Reference your object with 'this'

Inspired by darsain's definer:
https://github.com/darsain/definer