Socket
Socket
Sign inDemoInstall

@daybrush/utils

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@daybrush/utils - npm Package Compare versions

Comparing version 0.0.5 to 0.1.0

2

declaration/utils.d.ts

@@ -24,1 +24,3 @@ import { ObjectInterface } from "./consts";

export declare function decamelize(str: string): string;
export declare function now(): number;
export declare const requestAnimationFrame: any;

@@ -135,2 +135,17 @@ var prefixes = ["webkit", "ms", "moz", "o"];

}
function now() {
return Date.now ? Date.now() : new Date().getTime();
}
var requestAnimationFrame =
/*#__PURE__*/
function () {
var firstTime = now();
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
var currTime = now();
var id = window.setTimeout(function () {
callback(currTime - firstTime);
}, 1000 / 60);
return id;
};
}();

@@ -343,3 +358,3 @@ /**

export { COLOR_MODELS, cutHex, hexToRGBA, hex3to6, hslToRGBA, stringToRGBA, RGB, RGBA, HSL, HSLA, TRANSFORM, FILTER, ANIMATION, KEYFRAMES, isUndefined, isObject, isArray, isString, splitSpace, splitComma, splitBracket, splitUnit, camelize, decamelize, hasClass, addClass, removeClass, fromCSS };
export { COLOR_MODELS, cutHex, hexToRGBA, hex3to6, hslToRGBA, stringToRGBA, RGB, RGBA, HSL, HSLA, TRANSFORM, FILTER, ANIMATION, KEYFRAMES, isUndefined, isObject, isArray, isString, splitSpace, splitComma, splitBracket, splitUnit, camelize, decamelize, now, requestAnimationFrame, hasClass, addClass, removeClass, fromCSS };
//# sourceMappingURL=utils.esm.js.map

@@ -139,2 +139,17 @@ 'use strict';

}
function now() {
return Date.now ? Date.now() : new Date().getTime();
}
var requestAnimationFrame =
/*#__PURE__*/
function () {
var firstTime = now();
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
var currTime = now();
var id = window.setTimeout(function () {
callback(currTime - firstTime);
}, 1000 / 60);
return id;
};
}();

@@ -371,2 +386,4 @@ /**

exports.decamelize = decamelize;
exports.now = now;
exports.requestAnimationFrame = requestAnimationFrame;
exports.hasClass = hasClass;

@@ -373,0 +390,0 @@ exports.addClass = addClass;

2

package.json
{
"name": "@daybrush/utils",
"version": "0.0.5",
"version": "0.1.0",
"description": "utils for daybrush",

@@ -5,0 +5,0 @@ "main": "dist/utils.js",

@@ -80,1 +80,18 @@ import { ObjectInterface } from "./consts";

}
export function now() {
return Date.now ? Date.now() : new Date().getTime();
}
export const requestAnimationFrame = /*#__PURE__*/(() => {
const firstTime = now();
return (window as any).requestAnimationFrame ||
(window as any).webkitRequestAnimationFrame ||
(window as any).mozRequestAnimationFrame ||
((callback: (time: number) => void) => {
const currTime = now();
const id = window.setTimeout(() => {
callback(currTime - firstTime);
}, 1000 / 60);
return id;
});
})();

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