Huge News!Announcing our $40M Series B led by Abstract Ventures.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.7 to 0.2.8

39

lib/index.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('nanoid/nanoid')) :
typeof define === 'function' && define.amd ? define(['nanoid/nanoid'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.CountUp = factory(global.nanoid));
})(this, (function (nanoid) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('crypto')) :
typeof define === 'function' && define.amd ? define(['crypto'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.CountUp = factory(global.crypto));
})(this, (function (crypto) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
function noop() { }

@@ -276,2 +280,27 @@ function run(fn) {

let urlAlphabet =
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
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
};
const defaultOptions = {

@@ -390,3 +419,3 @@ root: null,

function instance($$self, $$props, $$invalidate) {
const id = nanoid.nanoid();
const id = nanoid();
let isInView;

@@ -393,0 +422,0 @@ let { value } = $$props;

2

package.json
{
"name": "svelte-countup",
"componentname": "CountUp",
"version": "0.2.7",
"version": "0.2.8",
"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