question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Export functions on the utils module

See original GitHub issue

Hello 👋

I’m building a datepicker on top of this library and wanted to know if it’s possible to export the functions on the utils module. In my use case, I have a Today button and to make it work properly, I’m making use of the normalizeDate and isEqual functions (but copying them).

Would be nice to import them directly from dayzed. What do you think about it?

Thanks in advance.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mkartchner994commented, Apr 10, 2018

@arthurdenner date-fns should be added to the dependencies since the methods that will be used from it will be packaged in with the <Dayzed> component dist bundle.

1reaction
mkartchner994commented, Apr 10, 2018

@arthurdenner I think this is ready for you now. I added some integration tests around the lib using Cypress.io - https://github.com/deseretdigital/dayzed/pull/16. Let me know if you have any questions. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Simplify exporting and importing of your JavaScript utility ...
I do this by creating a src/utils/index.js file: const { startOfDay } = require('./dates')module.exports = function useUtils() { return { startOfDay } }....
Read more >
module.exports – How to Export in Node.js and JavaScript
In this article, I will show you how to share functions and values by exporting and importing modules in Node.js.
Read more >
Understanding module.exports and exports in Node.js
Here we're assigning the functions and values we want to export to an exports property on module — and of course, this works...
Read more >
Node.js Export Module - TutorialsTeacher
Learn how to export different types as a Node.js modules here. ... The following example exposes an object with the log function as...
Read more >
Util::Any - to export any utilities and to create your own utility ...
If your utility module which inherited Util::Any has utility functions and export them by Exporter-like module, behaviour of 'all' and '-all' or ':all'...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found