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

creepyface-dance

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

creepyface-dance - npm Package Compare versions

Comparing version 7.5.0 to 8.0.0-alpha.0

5

dist/index.d.ts

@@ -1,6 +0,5 @@

import { PointProvider } from 'creepyface';
declare const directions: readonly ["n", "ne", "e", "se", "s", "sw", "w", "nw"];
declare type Direction = typeof directions[number];
export declare type Step = Direction | 'serious' | 'crazy';
export declare function makePointProvider({ name, audio, bpm, firstBeat, choreography, }: {
export declare function makePointProvider(options: {
name: string;

@@ -11,3 +10,3 @@ audio: HTMLAudioElement;

choreography: Step[];
}): PointProvider;
}): void;
export declare const moves: {

@@ -14,0 +13,0 @@ repeat: (i: number) => (steps: Step[]) => Step[];

2

dist/index.js

@@ -1,1 +0,1 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("creepyface")):"function"==typeof define&&define.amd?define(["exports","creepyface"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).creepyfaceDance={},e.creepyface)}(this,function(e,n){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=t(n),r=1/0,u=9007199254740991,o=17976931348623157e292,i=NaN,c="[object Function]",f="[object GeneratorFunction]",a="[object Symbol]",l=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,y=/^0o[0-7]+$/i,b=/^(?:0|[1-9]\d*)$/,v=parseInt,h=Object.prototype.toString,g=Math.ceil,m=Math.max;function j(e){var n=typeof e;return e&&("object"==n||"function"==n)}function w(e){return e?(e=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||!!(n=e)&&"object"==typeof n&&h.call(e)==a;var n}(e))return i;j(e)&&(e=j(n="function"==typeof e.valueOf?e.valueOf():e)?n+"":n);if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var n=d.test(e);return n||y.test(e)?v(e.slice(2),n?2:8):s.test(e)?i:+e}(e))!==r&&e!==-r?e==e?e:0:(e<0?-1:1)*o:0===e?e:0}var O,T=function(e,n,t){return t&&"number"!=typeof t&&function(e,n,t){if(!j(t))return!1;var r=typeof n;if("number"==r?function(e){return null!=e&&function(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=u}(e.length)&&!function(e){e=j(e)?h.call(e):"";return e==c||e==f}(e)}(t)&&function(e,n){return!!(n=null==n?u:n)&&("number"==typeof e||b.test(e))&&-1<e&&e%1==0&&e<n}(n,t.length):"string"==r&&n in t)return function(e,n){return e===n||e!=e&&n!=n}(t[n],e);return!1}(e,n,t)&&(n=t=void 0),e=w(e),void 0===n?(n=e,e=0):n=w(n),function(e,n,t,r){for(var u=-1,o=m(g((n-e)/(t||1)),0),i=Array(o);o--;)i[r?o:++u]=e,e+=t;return i}(e,n,t=void 0===t?e<n?1:-1:w(t),O)},x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},P=9007199254740991,S="[object Arguments]",E="[object Function]",F="[object GeneratorFunction]",n="object"==typeof x&&x&&x.Object===Object&&x,x="object"==typeof self&&self&&self.Object===Object&&self,n=n||x||Function("return this")();var x=Object.prototype,M=x.hasOwnProperty,$=x.toString,n=n.Symbol,A=x.propertyIsEnumerable,I=n?n.isConcatSpreadable:void 0;function L(e,n,t,r,u){var o=-1,i=e.length;for(t=t||B,u=u||[];++o<i;){var c=e[o];0<n&&t(c)?1<n?L(c,n-1,t,r,u):function(e,n){for(var t=-1,r=n.length,u=e.length;++t<r;)e[u+t]=n[t]}(u,c):r||(u[u.length]=c)}return u}function B(e){return C(e)||function(e){return function(e){return!!e&&"object"==typeof e}(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=P}(e.length)&&!function(e){e=function(e){var n=typeof e;return!!e&&("object"==n||"function"==n)}(e)?$.call(e):"";return e==E||e==F}(e)}(e)}(n=e)&&M.call(n,"callee")&&(!A.call(n,"callee")||$.call(n)==S)||!!(I&&e&&e[I]);var n}var C=Array.isArray;var G=function(e){return(e?e.length:0)?L(e,1):[]},N=["n","ne","e","se","s","sw","w","nw"];n={repeat:function(n){return function(e){return G(T(n).map(function(){return e}))}},intercalate:function(n,t){return T(2*n.length).map(function(e){return e%2?t:n[Math.floor(e/2)]})},circle:function(t){var r=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return T(N.length).map(function(e){return N[n=N.indexOf(t)+(r?e:-e),((e=N.length)+n%e)%e];var n})}};e.makePointProvider=function(e){var r,u,o,i,c,n=e.name,t=e.audio,f=e.bpm,a=e.firstBeat,l=e.choreography,s=[];return u=a,o=function(n){return s.forEach(function(e){return e(n)})},c=60/(f=f),f=function e(){var n,t;4===r.readyState?(n=r.currentTime<=u?0:Math.ceil((r.currentTime-u)/c),t=function(){return o(n++)},i=setTimeout(function(){t(),i=setInterval(t,1e3*c)},1e3*(u+n*c-r.currentTime))):r.addEventListener("canplaythrough",e)},(r=t).addEventListener("pause",function(){return clearTimeout(i)}),r.addEventListener("playing",f),r.paused||f(),f=function(e,i){function n(o){return e(function(){var e=i.getBoundingClientRect(),n=e.x,t=e.y,r=e.width,u=e.height;switch(l[o]){case"serious":return null;case"crazy":return[n+r/2,t+r/2];case"n":return[n+r/2,t-1];case"ne":return[n+r+1,t-1];case"e":return[n+r+1,t+u/2];case"se":return[n+r+1,t+u+1];case"s":return[n+r/2,t+u+1];case"sw":return[n-1,t+u+1];case"w":return[n-1,t+u/2];case"nw":return[n-1,t-1]}}())}return s.push(n),function(){return s.splice(s.indexOf(n),1)}},p.default.registerPointProvider(n,f),f},e.moves=n,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("creepyface")):"function"==typeof define&&define.amd?define(["exports","creepyface"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).creepyfaceDance={},e.creepyface)}(this,function(e,n){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(n),r=1/0,o=9007199254740991,u=17976931348623157e292,c=NaN,f="[object Function]",a="[object GeneratorFunction]",l="[object Symbol]",s=/^\s+|\s+$/g,p=/^[-+]0x[0-9a-f]+$/i,y=/^0b[01]+$/i,d=/^0o[0-7]+$/i,v=/^(?:0|[1-9]\d*)$/,b=parseInt,g=Object.prototype.toString,h=Math.ceil,m=Math.max;function j(e){var n=typeof e;return e&&("object"==n||"function"==n)}function w(e){return e?(e=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||!!(n=e)&&"object"==typeof n&&g.call(e)==l;var n}(e))return c;j(e)&&(e=j(n="function"==typeof e.valueOf?e.valueOf():e)?n+"":n);if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var n=y.test(e);return n||d.test(e)?b(e.slice(2),n?2:8):p.test(e)?c:+e}(e))!==r&&e!==-r?e==e?e:0:(e<0?-1:1)*u:0===e?e:0}var O,T=function(e,n,t){return t&&"number"!=typeof t&&function(e,n,t){if(!j(t))return!1;var r=typeof n;if("number"==r?function(e){return null!=e&&function(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=o}(e.length)&&!function(e){e=j(e)?g.call(e):"";return e==f||e==a}(e)}(t)&&function(e,n){return!!(n=null==n?o:n)&&("number"==typeof e||v.test(e))&&-1<e&&e%1==0&&e<n}(n,t.length):"string"==r&&n in t)return function(e,n){return e===n||e!=e&&n!=n}(t[n],e);return!1}(e,n,t)&&(n=t=void 0),e=w(e),void 0===n?(n=e,e=0):n=w(n),function(e,n,t,r){for(var o=-1,u=m(h((n-e)/(t||1)),0),i=Array(u);u--;)i[r?u:++o]=e,e+=t;return i}(e,n,t=void 0===t?e<n?1:-1:w(t),O)},x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},E=9007199254740991,L="[object Arguments]",P="[object Function]",S="[object GeneratorFunction]",n="object"==typeof x&&x&&x.Object===Object&&x,x="object"==typeof self&&self&&self.Object===Object&&self,n=n||x||Function("return this")();var x=Object.prototype,F=x.hasOwnProperty,M=x.toString,n=n.Symbol,$=x.propertyIsEnumerable,A=n?n.isConcatSpreadable:void 0;function I(e,n,t,r,o){var u=-1,i=e.length;for(t=t||B,o=o||[];++u<i;){var c=e[u];0<n&&t(c)?1<n?I(c,n-1,t,r,o):function(e,n){for(var t=-1,r=n.length,o=e.length;++t<r;)e[o+t]=n[t]}(o,c):r||(o[o.length]=c)}return o}function B(e){return C(e)||function(e){return function(e){return!!e&&"object"==typeof e}(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=E}(e.length)&&!function(e){e=function(e){var n=typeof e;return!!e&&("object"==n||"function"==n)}(e)?M.call(e):"";return e==P||e==S}(e)}(e)}(n=e)&&F.call(n,"callee")&&(!$.call(n,"callee")||M.call(n)==L)||!!(A&&e&&e[A]);var n}var C=Array.isArray;var G=function(e){return(e?e.length:0)?I(e,1):[]},N=["n","ne","e","se","s","sw","w","nw"];function _(t,e,r,o){function u(){clearTimeout(c),clearInterval(f)}function i(){var e,n;u(),4===t.readyState?(e=t.currentTime<=r?0:Math.ceil((t.currentTime-r)/a),n=function(){return o(e++)},c=setTimeout(function(){n(),f=setInterval(n,1e3*a)},1e3*(r+e*a-t.currentTime))):t.addEventListener("canplaythrough",i)}var c,f,a=60/e;return t.addEventListener("pause",u),t.addEventListener("playing",i),t.paused||i(),function(){t.removeEventListener("canplaythrough",i),t.removeEventListener("pause",u),t.removeEventListener("playing",i),u()}}var k={serious:null,crazy:[0,0],n:[0,-1],ne:[1,-1],e:[1,0],se:[1,1],s:[0,1],sw:[-1,1],w:[-1,0],nw:[-1,-1]};n={repeat:function(n){return function(e){return G(T(n).map(function(){return e}))}},intercalate:function(n,t){return T(2*n.length).map(function(e){return e%2?t:n[Math.floor(e/2)]})},circle:function(t){var r=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return T(N.length).map(function(e){return N[n=N.indexOf(t)+(r?e:-e),((e=N.length)+n%e)%e];var n})}};e.makePointProvider=function(e){var n=e.name,t=e.audio,r=e.bpm,o=e.firstBeat,u=e.choreography;i.default.registerPointProvider(n,function(n){return _(t,r,o,function(e){return n(k[u[e]])})},function(e,n){var t=n.getBoundingClientRect(),r=t.x,o=t.y,n=t.width,t=t.height;return e?[r+n/2+n/2*2*e[0],o+t/2+t/2*2*e[1]]:null})},e.moves=n,Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "creepyface-dance",
"version": "7.5.0",
"version": "8.0.0-alpha.0",
"main": "dist/index.js",

@@ -39,3 +39,3 @@ "types": "dist/index.d.ts",

"@types/lodash.range": "^3.2.6",
"creepyface": "^7.5.0",
"creepyface": "^8.0.0-alpha.0",
"lodash.flatten": "^4.4.0",

@@ -42,0 +42,0 @@ "lodash.range": "^3.2.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