Skip to content
Reactive properties for JavaScript and TypeScript
JavaScript TypeScript Other
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.nuget Fix reference error.
content
dist
packages
scripts
src
.gitignore
GruntFile.js
LICENSE
Propjet.csproj
Propjet.png
Propjet.sln Fix reference error.
PropjetJS.zip
README.md
Stub.cs Build script
bower.json v1.3.0
build.bat v1.0.0
demo.css
demo.ts
index.html ver 0.6
jasmine.html ver 0.5
npm_install.bat
package.json v1.3.0
packages.config
propjet.js.1.0.nupkg v1.3.0
tslint.json Build script
web.Debug.config Initial commit
web.Release.config
web.config

README.md

propjet.js

JavaScript/TypeScript library for declaring reactive properties.

Supports function mode for outdated browsers (IE8 and below).

Code licensed under MIT License.

Installing

Via NuGet: $ Install-Package propjet.js

Via Bower: $ bower install propjet.js

Manually: extract files from PropjetJS.zip

Example

class Person
{
    constructor()
    {
        propjet(this);
    }

    firstName = propjet<string>().
        default(() => "Unknown").
        declare();

    lastName = "";

    fullName = propjet<string>().
        require(() => this.firstName, () => this.lastName).
        get((firstName, lastName) => (firstName + " " + lastName).trim()).
        declare();

    propIE8 = propjet<string>().
        default(() => "Hello, IE!").
        declare(true); // function mode: get - propIE8(), set - propIE8(newValue)
}

more - documentation, AngularJS demo, Jasmine specs

Something went wrong with that request. Please try again.