Have ideas to improve npm?Join in the discussion! »

    path-ify

    1.0.4 • Public • Published

    Forms a object composed of the path from the given object.

      it('2.1 to be ', function() {
        (pathify.toPath({b: {a: 1, c: 2}})).should.deepEqual({
          'b.a': 1,
          'b.c': 2
        });
      });
    
      it('2.2 to be ', function() {
        (pathify.toPath({b: {a: 1, c: 2}, d: {a: {j: [0, 1, 2]}}})).should.deepEqual({
          'b.a': 1,
          'b.c': 2,
          'd.a.j': [0, 1, 2]
        });
      });
    

    Install

    npm i path-ify

    DownloadsWeekly Downloads

    6

    Version

    1.0.4

    License

    ISC

    Last publish

    Collaborators

    • avatar