Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@segment/isodate-traverse

Package Overview
Dependencies
Maintainers
147
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@segment/isodate-traverse

Traverse an object and convert all ISO strings into Dates.

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
593K
increased by7.63%
Maintainers
147
Weekly downloads
 
Created

What is @segment/isodate-traverse?

@segment/isodate-traverse is an npm package designed to traverse through objects and convert ISO 8601 date strings into JavaScript Date objects. This can be particularly useful when dealing with JSON data that includes date strings, ensuring that date manipulations and comparisons are handled correctly.

What are @segment/isodate-traverse's main functionalities?

Convert ISO 8601 date strings to Date objects

This feature allows you to traverse through an object and automatically convert any ISO 8601 date strings into JavaScript Date objects. This ensures that date manipulations and comparisons are handled correctly.

const traverse = require('@segment/isodate-traverse');

const data = {
  createdAt: '2023-10-01T12:00:00Z',
  user: {
    lastLogin: '2023-10-02T15:30:00Z'
  }
};

const result = traverse(data);
console.log(result);
// Output:
// {
//   createdAt: 2023-10-01T12:00:00.000Z,
//   user: {
//     lastLogin: 2023-10-02T15:30:00.000Z
//   }
// }

Other packages similar to @segment/isodate-traverse

Keywords

FAQs

Package last updated on 25 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc