jskey into the
support.jsfile is your main entry-point to extend the language functionality of Pulsar. There are currently three main groups of functionality you can extend, each with distinct usage:
@ds.allTokens(). This will fetch the data from the selected design system and give all of it as the result. Let's take the following example:
@ds.allTokens()function returns? To do that, we open our support.js file and pass the following code:
Pulsar.global-scope object to register new functionality into the language.
Pulsaris only available inside the file you have declared inside the
@symbol - which signalizes that you are calling a function.
@js.and you must write them as such in your blueprint.
@ds.allColorTokens()are all using this advanced option. The great thing about promises in Pulsar is that they are automatically identified, analyzed and auto-awaited, so you can write serial code with a very complex "backend". Take the following example:
dsm.allTokens()is a function that selects an appropriate design system to target based on your selection, authenticates you, downloads data from Supernova servers, parses them, prepares them for easy use, yet all its thousands of lines of code powering it are completely hidden to you - allowing you to focus on what is important and that is the manipulation with that data.
typedand constrained only to one specific type:
Date.now and new Date()have been removed
RegExp.prototype.compilehave been removed
Math.randomand any other randomizer has been removed
primordialobjects are non-extensible