1.7.26 • Published 2 years ago

parenter v1.7.26

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

QA monorepo

JavaScript Style Guide CircleCI Maintainability Test Coverage FOSSA Statuslerna

Installation

npm install parenting

Motivation

Getting parent and children shall be as easy drinking water (yes there are people hate drinking water).

Early release

The current API will work as is but will be extended soon. Soon the parent and children tags will be redefinable, and optional.

Examples

For now the current tests will do it:

const {expect} = require('chai')
const partenting = require('../../src')

describe('Basic Test Suite', function () {
  exampleObject = {
    a:{
      b:{
        c:1,
        c1:2,
        c3:{
          deep:{
            deeper:{
              whatCouldGoWrong: 1
            }
          }
        },
        c4:4
      },
      d:{
        e:2
      }
    },
    f: 'g',
    array:[
      {a:{b:'c'}}
    ]
  }

  it('checking default results', function () {
    const parented = partenting(exampleObject)()
    expect(parented.a.b.c3.parent()).to.deep.equal(parented.a.b)
    expect(parented.a.parent()).to.deep.equal(parented)
    expect(parented.a.children()[0].parent()).to.deep.equal(parented)
  })
})
1.7.22

2 years ago

1.7.24

2 years ago

1.7.25

2 years ago

1.7.26

2 years ago

1.7.19

2 years ago

1.7.18

2 years ago

1.7.16

3 years ago

1.7.17

3 years ago

1.7.12

3 years ago

1.7.13

3 years ago

1.7.14

3 years ago

1.7.15

3 years ago

1.7.10

3 years ago

1.7.11

3 years ago

1.7.9

3 years ago

1.7.2

3 years ago

1.7.8

3 years ago

1.7.4

3 years ago

1.6.65

5 years ago

1.6.64

5 years ago

1.6.62

5 years ago

1.6.61

5 years ago

1.6.60

5 years ago

1.6.59

5 years ago

1.6.57

5 years ago

1.6.56

5 years ago

1.6.55

5 years ago

1.6.54

5 years ago

1.6.52

5 years ago

1.6.51

5 years ago

1.6.50

5 years ago

1.6.42

5 years ago

1.6.41

5 years ago

1.6.39

5 years ago

1.6.38

5 years ago

1.6.37

5 years ago

1.6.33

5 years ago

1.6.31

5 years ago

1.6.26

5 years ago

1.6.25

5 years ago

1.6.24

5 years ago

1.6.23

5 years ago

1.6.22

5 years ago

1.6.21

5 years ago

1.6.20

5 years ago

1.6.19

5 years ago

1.6.14

5 years ago