protoblast
Advanced tools
Changelog
0.7.2 (2020-07-21)
String#dedent()
methoddeprecate
decoratorFunction.parallel
& Function.series
where primitives would be turned into objectsRURL#segments
will now no longer contain empty stringsRURL#isDescendant(parent)
to see if the current path is a descendant of the given pathChangelog
0.7.1 (2020-07-11)
Function#setProperty
now accepts a single object to set multiple propertiesStream.Delayed()
classStream.Combined()
classCrypto.randomHex()
returning faulty data@
as a namespace will put it in the rootFormData
classPledge
progress, the duration of each interval is also loggedreset_on_call
option of Function.throttle
actually workPledge
on .then()
Pledge.Timeout
classString#splitCharacters()
for getting an array of the string's charactersloopOverArgument()
decorator, which will loop over the given argument if it's an arrayempty
event to FunctionQueueRURL#extension
property to get/set the extension of the pathnameRURL#pathname
will now no longer be empty when the protocol requires a slashError
classFunction.isNativeClass()
to detect functions made with native class
syntaxSymbol.hasInstance
trap to the namespace functionssetImmediate
for rejecting Pledges to prevent uncaught warningsBlast.versions
entries not being set correctlyChangelog
0.7.0 (2020-03-13)
Blast.parseUseragent(ua)
methodBlast.require()
and specify specific browser versionsBlast.checksumSymbol
properties to serveral protoblast objectsmodify_prototypes
option to the client templateFunction.series
or Function.parallel
String#encodeHTML()
will no longer encode newlinesProtoblast#version_string
property, use it to add to the #loaded_versions
propertyRURL
should keep slashes when no protocol is givenFunction.enforceProperty
will already add the used symbol to the prototypeString.decodeAttributes()
decode tag attributes by default (no separator)Date#timeAgo()
returning big hours, minutes & seconds when date is more than a month agoArray#sortByPath()
handle comparing undefined
and objects betterheaders
option to Request#setOptions()
will no longer unset earlier headersRegExp.interpretWildcard(str, flags)
Function.tokenize
so it'll recognize regular expressions betterObject.walk
throwing an error when handling Object.create(null)
objectsMath
objectState
class will no longer turn off-line when a stale request times outState#online_status_duration
property to State#current_status_duration
Request
when a timeout occursdelay
option to Function.throttle()
to always enforce a minimum delayRURL#param()
will now set the key-values as parametersFunction.enforceProperty
setter/gettersRequest
now has a max_timeout
property that defaults to 30 seconds, instead of a hardcoded 8 seconds__enumerate
trap from the Magic classPledge.done(promise, callback)
as a static methodtime_started
and time_ended
properties to the Request
classArray#safesort()
, which won't throw an error when sorting Objects with no prototypetype
property of an XMLHttpRequest's response
objectDate#format()
cast
argument to String#assign()
methodString#underscore()
methodString#decodeJSONURI()
will now only try to decode JSON if it contains certain json charactersArray#createIterator()
method as it breaks CKEditorDate.secondsToDuration()
Date.firstWeekOfYear(year)
& Date.firstDayOfWeek(year, week)
Blast.getClientPath()
Request#download_if_inline
boolean optionStringBuilder
classPledge#done()
Pledge.isThenable()
and Pledge.hasPromiseInterface()
Pledge.cast()
to turn something into a pledgeChangelog
0.6.6 (2019-02-25)
String#allIndexesOf(needle)
to get an array of indexesString#tokenizeHTML(source)
when supplying custom blocksFunction#enforceProperty(setter)
Blast.requireAll()
to require multiple files with the same optionsmodifyChildConstructor
functionMagic
class, which supports Magic getters & setters by using proxiesBlast.parseUseragent(ua)
to parse a useragent stringChangelog
0.6.5 (2019-02-18)
Function#throttle()
not throttling enough because setTimeout
fires too soonString#isUpperCase()
and String#isLowerCase()
ignore_arguments
option to the memoize()
decoratorObject#zip(keys, values)
and Object#unzip(obj)
Blast.checksumSymbol
you can use to define a method that replaces the parameter of a Object.checksum(obj)
callDate.parseString()
understand regular date stringsFunction.contitute(fnc)
schedule the function using Blast.queueImmediate()
if Blast has already been loadedqueueImmediate
, queueTick
methods asynchronous even after Blast had loadedBlast.doLoaded()
will now also work after Protoblast has already loaded onceRegExp.interpret()
main_class
getter to namespacesString#countCharacters()
to count characters, including emojisString#count()
use String#countCharacters()
when empty string is givenString#substrCharacters(begin, length)
to get a substring of the actual charactersString#substringCharacters(begin, end)
String#truncate()
honour emojisString#stripTags
methodChangelog
0.6.4 (2019-01-12)
Request
class implementationPledge
instances executing the callbacks synchronouslyCache#has(key)
return true for expired entriesmemoize
Decorator not setting max_age
when ignore_callbacks
is truecast
argument to Array#unique()
Pledge#_started
is now a timestamp, not a booleanPledge
classBlast.REPLACE_OPEN_TAG_NEWLINE
symbol for use in String#stripTags()
Deck#remove(key)
methodString#romanize()
stripping diacritics before being able to replace themString#diacriticRegex()
Request
not handling redirect properlyDate.parseStringToTime(str, base)
not parsing base strings properlyChangelog
0.6.3 (2018-12-06)
RURL#usedBaseProperty(name)
to find out if a property came from the base locationDate#startOf(unit)
to set dacesecond & decaminuteFunction.series
will now pass the value from the previous task to the nextLazyPledge
class, which will only call on the executor once then
has been calledBlast.isWebview
to detect when it's running in a webviewrequestIdleCallback
as a setImmediate
implementation in the browserInformer#emit()
exit early when no listeners are foundDate#timestamp
getterflag
parameter to Object.path(flag, obj, path)
Blast.PATH_AGGREGATE
flagArray#sortByPath()
String#stripTags()
, based on Eric Norris implementationChangelog
0.6.2 (2018-11-09)
RURL#seems_valid
propertyRequest
class & add browser supportFunction#throttle(fnc)
now accepts a config object as second argumentFunction#throttle(fnc, config)
can now be used in classesthrottle
method decoratorBlast.requestIdleCallback
implementationromanize
string methodsFunction.curry
functionChangelog
0.6.1 (2018-10-16)
Informer#forwardEvent()
now accepts a single event emitter to forward ALL events toBlast#setImmediate()
throw an error if the callback argument isn't a functionFunction.setMethod()
will use Obj.getPropertyDescriptor
to check existing methods, so no getters are accidentally triggered