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

detritus-utils

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detritus-utils - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

lib/baseset.d.ts

2

lib/constants.js

@@ -5,5 +5,5 @@ "use strict";

URL: 'https://github.com/detritusjs/utils',
VERSION: '0.1.7',
VERSION: '0.1.8',
});
exports.DISCORD_SNOWFLAKE_EPOCH = 1420070400000;
exports.DISCORD_TOKEN_EPOCH = 1293840000000;

@@ -7,2 +7,3 @@ import * as Constants from './constants';

export * from './basecollection';
export * from './baseset';
export * from './eventemitter';

@@ -15,2 +15,3 @@ "use strict";

__export(require("./basecollection"));
__export(require("./baseset"));
__export(require("./eventemitter"));

@@ -6,3 +6,3 @@ export declare function normalize(object: {

}>;
export declare function guildIdtoShardId(guildId: string, shardCount?: number): number;
export declare function guildIdToShardId(guildId: string, shardCount?: number): number;
export declare type URIEncodeWrapFunc = (...args: Array<any>) => string;

@@ -9,0 +9,0 @@ export declare type URIEncodeWrapped = {

@@ -10,6 +10,6 @@ "use strict";

exports.normalize = normalize;
function guildIdtoShardId(guildId, shardCount = 0) {
return (+(guildId) >> 22) % shardCount;
function guildIdToShardId(guildId, shardCount = 0) {
return (+(guildId) / (1 << 22)) % shardCount;
}
exports.guildIdtoShardId = guildIdtoShardId;
exports.guildIdToShardId = guildIdToShardId;
const safeCharacter = '@';

@@ -16,0 +16,0 @@ function URIEncodeWrap(unsafe) {

{
"name": "detritus-utils",
"version": "0.1.7",
"version": "0.1.8",
"description": "Detritus Utils",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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