Socket
Book a DemoInstallSign in
Socket

@endeo/types

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@endeo/types

Common types for values in @endeo/special objects.

0.1.0
unpublished
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@endeo/types

Build Status Dependency Status npm version

Common types for values in @endeo/specials objects.

These are used when creating an "object spec" to encode a "special object" in a compressed format. They are specified as the 'type' in the enhancers object.

When endeo's enbyte encodes a "special object" it must test each key's value to determine which type it is so it knows how to encode it. Specify its exact type to skip that work.

See packages:

  • endeo
  • enbyte
  • debyte

Install

npm install --save @endeo/types

Usage

var types = require('@endeo/types')

var enhancers = {
  key: {
    type: types.day
  }
}

// OR, when specials has the type
specials.addType('day', types.day)

var enhancers = {
  key: 'day'
}

Extra Types

There are two extra types available for optional use:

  • day - A Date requires many bytes to encode because it has a lot of info. If you only want to store the year, month, and day (in month) then you may use this type and it'll encode it in four bytes instead.
  • time - As mentioned above, a Date requires many bytes. If you only want the hours and minutes (24-hour style) then use this type to encode it in two bytes.

MIT License

FAQs

Package last updated on 18 May 2017

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.