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.1.2 to 0.1.3

2

declaration/utils.d.ts

@@ -25,2 +25,2 @@ import { ObjectInterface } from "./consts";

export declare function now(): number;
export declare const requestAnimFrame: (callback: FrameRequestCallback) => number;
export declare const requestAnimationFrame: (callback: FrameRequestCallback) => number;

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

function (property) {
if (typeof document === "undefined") {
return "";
}
var styles = (document.body || document.documentElement).style;

@@ -139,7 +143,8 @@ var length = prefixes.length;

}
var requestAnimFrame =
var requestAnimationFrame =
/*#__PURE__*/
function () {
var firstTime = now();
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
var raf = typeof window !== "undefined" && (window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame);
return raf ? raf.bind(window) : function (callback) {
var currTime = now();

@@ -359,3 +364,3 @@ var id = window.setTimeout(function () {

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, requestAnimFrame, 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

@@ -10,2 +10,6 @@ 'use strict';

function (property) {
if (typeof document === "undefined") {
return "";
}
var styles = (document.body || document.documentElement).style;

@@ -143,7 +147,8 @@ var length = prefixes.length;

}
var requestAnimFrame =
var requestAnimationFrame =
/*#__PURE__*/
function () {
var firstTime = now();
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
var raf = typeof window !== "undefined" && (window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame);
return raf ? raf.bind(window) : function (callback) {
var currTime = now();

@@ -388,3 +393,3 @@ var id = window.setTimeout(function () {

exports.now = now;
exports.requestAnimFrame = requestAnimFrame;
exports.requestAnimationFrame = requestAnimationFrame;
exports.hasClass = hasClass;

@@ -391,0 +396,0 @@ exports.addClass = addClass;

{
"name": "@daybrush/utils",
"version": "0.1.2",
"version": "0.1.3",
"description": "utils for daybrush",

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

@@ -33,2 +33,2 @@ # @daybrush/utils [![npm version](https://badge.fury.io/js/%40daybrush%2Futils.svg)](https://badge.fury.io/js/%40daybrush%2Futils)

* fromCSS,
* requestAnimFrame( = requestAnimationFrame)
* requestAnimationFrame

@@ -7,2 +7,5 @@ export interface ObjectInterface<T> {

const checkProperties = /*#__PURE__*/(property: string) => {
if (typeof document === "undefined") {
return "";
}
const styles = (document.body || document.documentElement).style as any;

@@ -9,0 +12,0 @@ const length = prefixes.length;

@@ -83,9 +83,9 @@ import { ObjectInterface } from "./consts";

}
export const requestAnimFrame = /*#__PURE__*/(() => {
export const requestAnimationFrame = /*#__PURE__*/(() => {
const firstTime = now();
const raf = typeof window !== "undefined" &&
(window.requestAnimationFrame || window.webkitRequestAnimationFrame ||
(window as any).mozRequestAnimationFrame);
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
((window as any).mozRequestAnimationFrame as (callback: FrameRequestCallback) => number) ||
((callback: FrameRequestCallback) => {
return raf ? (raf.bind(window) as (callback: FrameRequestCallback) => number) : ((callback: FrameRequestCallback) => {
const currTime = now();

@@ -92,0 +92,0 @@ const id = window.setTimeout(() => {

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