Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@symbo.ls/scratch

Package Overview
Dependencies
Maintainers
5
Versions
263
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@symbo.ls/scratch - npm Package Compare versions

Comparing version 0.7.19 to 0.7.20

src/defaultConfig/animation.js

2

package.json

@@ -5,3 +5,3 @@ {

"author": "symbo.ls",
"version": "0.7.19",
"version": "0.7.20",
"files": [

@@ -8,0 +8,0 @@ "src"

@@ -19,3 +19,4 @@ 'use strict'

export * from './cases'
export * from './animation'
export const RESET = {}

@@ -41,3 +41,4 @@ 'use strict'

reset: setSameValue,
unit: setSameValue
unit: setSameValue,
animation: setSameValue
}

@@ -44,0 +45,0 @@

'use strict'
import { toDashCase } from '@symbo.ls/utils'
import { UNIT } from '../defaultConfig'
import { SEQUENCE, SPACING, UNIT } from '../defaultConfig'
import { CONFIG } from '../factory'

@@ -85,2 +85,16 @@ import { isString } from './object'

const switchSequenceOnNegative = (key, base, ratio) => {
const values = Object.values(SEQUENCE)
const index = values.indexOf(ratio)
const diffRatio = ratio / SPACING.ratio
const total = values[values.length - 1] - values[0]
const avg = total / 2
const diff = avg - ratio
const scale = total / ratio
const finalDiff = avg + avg / diffRatio
// if (key < 0) return base * Math.pow(avg, key)
return base * Math.pow(ratio, key)
}
export const generateSequence = (sequenceProps) => {

@@ -94,4 +108,4 @@ const { type, base, ratio, range, subSequence } = sequenceProps

const letterKey = numToLetterMap[key]
const value = base * Math.pow(ratio, key)
const scaling = ~~(value / base * 1000) / 1000
const value = switchSequenceOnNegative(key, base, ratio)
const scaling = ~~(value / base * 100) / 100
const variable = prefix + letterKey

@@ -98,0 +112,0 @@

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