detritus-utils
Advanced tools
Comparing version 0.1.7 to 0.1.8
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22162
17
752