Skip to content

Releases: trojs/objects

Add mixed field types for more flexibility

20 Apr 07:30
da876c7
Compare
Choose a tag to compare
Merge pull request #88 from hckrnews/fix-optional-keys

Add mixed field types for more flexibility

Finetune the validation errors

19 Apr 12:10
bc53eec
Compare
Choose a tag to compare
Merge pull request #87 from hckrnews/fix-optional-keys

Fix optional keys

Fix optional keys

19 Apr 10:08
d695ef1
Compare
Choose a tag to compare
Merge pull request #86 from hckrnews/fix-optional-keys

Fix optional keys

Fix the optional keys

16 Apr 14:05
007e4ca
Compare
Choose a tag to compare
class Test2 {
    constructor(name) {
        this.name = name;
    }
}

const Test3Schema = {
    name: String
}

const schema = {
    name: String,
    'test?': Test2,
    'test3?': Test3Schema
}

const Test = Obj({ schema })


const test2 = new Test2('me')

const data = {
    name: 'test',
    test: test2,
    test3: [{ name: 'test' }],
}


const test = Test.create(data)

Fix sub array validation

16 Apr 13:28
acb9a77
Compare
Choose a tag to compare
class Test2 {
    constructor(name) {
        this.name = name;
    }
}

const Test3Schema = {
    name: String
}

const schema = {
    name: String,
    test: Test2,
    test3: Test3Schema
}

const Test = Obj({ schema })


const test2 = new Test2('me')

const data = {
    name: 'test',
    test: test2,
    test3: [{ name: 'test' }],
}


const test = Test.create(data)

Test objects with custom objects

15 Apr 19:47
5548389
Compare
Choose a tag to compare
2.2.1

Merge pull request #83 from hckrnews/feature/validate-object-with-fun…

Object van now also contain and validate functions

15 Apr 18:34
7e697af
Compare
Choose a tag to compare
2.2.0

Merge pull request #82 from hckrnews/feature/validate-object-with-fun…

Test with node 15

18 Mar 08:52
84333af
Compare
Choose a tag to compare
Merge pull request #71 from hckrnews/feature/node15

Test with node 15

Run build before publishing

18 Mar 08:18
62948ce
Compare
Choose a tag to compare
Merge pull request #70 from hckrnews/feature/validation

Run build before publishing

Minor tweaks, fix the license type in the package

18 Mar 08:03
97bda8e
Compare
Choose a tag to compare
Merge pull request #69 from hckrnews/feature/validation

Minor tweaks, fix the license type in the package