This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Koen Bok
Posted Jan 19 - Read on Facebook

Protip: Framer includes the Lodash Javascript library. This has a lot of cool helper functions that you can use.

Some examples:

See if something is a string:
if _.isString(something)

Run animations for a set of layers:
_.invoke([layerA, layerB, layerC], "animate", {curve: "spring(100,10,0)})

See which layers are wider than 400px
layers = _.filter [layerA, layerB], (layer) ->
layer.width > 400

For the full docs:

2 Comments

Marc Krenn

Hey Florian,
Lodash is pretty much up-to-date with v4.14.1 from July 29th '16.

_.cloneDeep works fine for me:
https://framer.cloud/VIlIs

Thomas Aylott

cc John-David Dalton

Read the entire post on Facebook