New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

svelte-countup

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-countup - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

39

lib/index.js

@@ -283,23 +283,20 @@ (function (global, factory) {

const POOL_SIZE_MULTIPLIER = 128;
let pool, poolOffset;
let fillPool = bytes => {
if (!pool || pool.length < bytes) {
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
crypto__default["default"].randomFillSync(pool);
poolOffset = 0;
} else if (poolOffset + bytes > pool.length) {
crypto__default["default"].randomFillSync(pool);
poolOffset = 0;
}
poolOffset += bytes;
};
let nanoid = (size = 21) => {
fillPool((size -= 0));
let id = '';
for (let i = poolOffset - size; i < poolOffset; i++) {
id += urlAlphabet[pool[i] & 63];
}
return id
};
let random = bytes =>
new Promise((resolve, reject) => {
crypto__default["default"].randomFill(Buffer.allocUnsafe(bytes), (err, buf) => {
if (err) {
reject(err);
} else {
resolve(buf);
}
});
});
let nanoid = (size = 21) =>
random(size).then(bytes => {
let id = '';
while (size--) {
id += urlAlphabet[bytes[size] & 63];
}
return id
});

@@ -306,0 +303,0 @@ const defaultOptions = {

{
"name": "svelte-countup",
"componentname": "CountUp",
"version": "0.2.2",
"version": "0.2.3",
"main": "lib/index.js",

@@ -6,0 +6,0 @@ "module": "lib/index.mjs",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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