Giter VIP home page Giter VIP logo

Comments (2)

paulmolluzzo avatar paulmolluzzo commented on September 23, 2024

This is because the helpers are being assigned directly on data-point and not in a helpers object on data-point.

I have 2 workable solutions, with one changing the exported data-point library.

Changing just the example with the following line will work: const Helpers = DataPoint. This solution seems wrong though, and conflicts with the example in the README here: https://github.com/ViacomInc/data-point/tree/0f84eafbe6b5d7f1df6cdd40d9a9e7cc0746a164/packages/data-point#adding-new-entity-types

The other solution is to modify the export in ~/packages/data-point/lib/index.js to put the helpers as a key on the exported object:

module.exports = Object.assign({}, require('./core'), { helpers: require('./helpers') })

This solution seems more correct but changes the API surface of data-point, so I'd like to know it's the correct solution before submitting a PR.

If either seems correct I can push a PR. Thanks!

from data-point.

acatl avatar acatl commented on September 23, 2024

Lets do changing the README and the example to use DataPoint's Object.

thanks for looking into this one!

from data-point.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.