diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg index cb932df..5f87f16 100755 --- a/.husky/prepare-commit-msg +++ b/.husky/prepare-commit-msg @@ -1,4 +1,11 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" +COMMIT_MSG_FILE=$1 +COMMIT_SOURCE=$2 +SHA1=$3 + +if [ $COMMIT_SOURCE = 'commit' ] && [ -n $SHA1 ]; then + exit 0; +fi exec < /dev/tty && npx cz --hook || true diff --git a/CHANGELOG.md b/CHANGELOG.md index bed72e7..5cc50e1 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,18 @@ -## 0.4.5 (2023-11-11) +## 0.4.6 (2023-11-21) + +* build: update gobstones-core to latest version of scripts ([0a29c20](https://github.com/gobstones/gobstones-core/commit/0a29c20)), closes [#19](https://github.com/gobstones/gobstones-core/issues/19) + + -* chore: update scripts to version 5 ([4e2f67d](https://github.com/gobstones/gobstones-core/commit/4e2f67d)) +## 0.4.6 (2023-11-21) +- build: update gobstones-core to latest version of scripts ([0a29c20](https://github.com/gobstones/gobstones-core/commit/0a29c20)), closes [#19](https://github.com/gobstones/gobstones-core/issues/19) + +## 0.4.6 (2023-11-20) + +## 0.4.5 (2023-11-11) +- chore: update scripts to version 5 ([4e2f67d](https://github.com/gobstones/gobstones-core/commit/4e2f67d)) ## 0.4.4 (2023-11-10) diff --git a/README.md b/README.md index b75fa7c..17111ca 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A set of utility types, interfaces and classes that are used through all the Gob [![Licence](https://img.shields.io/github/license/gobstones/gobstones-core?style=plastic&label=License&logo=open-source-initiative&logoColor=white&color=olivegreen)](https://github.com/gobstones/gobstones-core/blob/main/LICENSE) [![Version](https://img.shields.io/github/package-json/v/gobstones/gobstones-core?style=plastic&label=Version&logo=git-lfs&logoColor=white&color=crimson)](https://www.npmjs.com/package/@gobstones/gobstones-core) [![API Docs](https://img.shields.io/github/package-json/homepage/gobstones/gobstones-core?color=blue&label=API%20Docs&logo=gitbook&logoColor=white&style=plastic)](https://gobstones.github.io/gobstones-core) -![GitHub Workflow Tests](https://img.shields.io/github/workflow/status/gobstones/gobstones-core/test-on-commit?style=plastic&label=Tests&logo=github-actions&logoColor=white) ![GitHub Workflow Build](https://img.shields.io/github/workflow/status/gobstones/gobstones-core/build-on-commit?style=plastic&label=Build&logo=github-actions&logoColor=white) +![GitHub Workflow Tests](https://img.shields.io/github/workflow/status/gobstones/gobstones-core/on-commit-test?style=plastic&label=Tests&logo=github-actions&logoColor=white) ![GitHub Workflow Build](https://img.shields.io/github/workflow/status/gobstones/gobstones-core/on-commit-build?style=plastic&label=Build&logo=github-actions&logoColor=white) ## Install diff --git a/docs/classes/Events.EventEmitter.html b/docs/classes/Events.EventEmitter.html index 6e42ded..59c68e1 100644 --- a/docs/classes/Events.EventEmitter.html +++ b/docs/classes/Events.EventEmitter.html @@ -1,5 +1,5 @@ -
The expectation class is the class that is actually instantiated for +
The expectation class is the class that is actually instantiated for any expectation. It implements all interfaces for expectations, even the finished expectation ones.
Abstract
This abstract class provides finished expectation behavior for +
Abstract
This abstract class provides finished expectation behavior for all actions based on the fact that it's subclass provides an implementation for getResult.
A joined expectation consist of multiple expectations joined by a specific +
A joined expectation consist of multiple expectations joined by a specific joiner function. A JoinedExpectation implements FinishedExpectation, where the result is calculated using the given joiner function.
Currently two join forms are provided, Expectations!and, @@ -25,4 +25,4 @@
This object contains a series of matchers, that is, a series of functions +
This object contains a series of matchers, that is, a series of functions
that can be called with the actual value (and in cases a series of arguments)
and returns a boolean, true
if the value satisfies the matcher, and false
otherwise.
Static
toStatic
toThis class models a Gobstones Board with all it's associated behavior. +
This class models a Gobstones Board with all it's associated behavior. Note that an instance of this class implements BoardDefinition, so it can be used as a valid description of a board in the Gobstones Interpreter and is @@ -458,4 +458,4 @@
removeRow on an instance.
The base class of the error hierarchy that is thrown when +
Readonly
isA boolean that specifies the instance as an error. Always true
.
A cell
+A cell
removeStones on an instance with any color and value.
This enum represent the valid Gobstones Colors. +
This enum represent the valid Gobstones Colors. It provides a set of singleton cases, for each possible value, as well as static accessors for each case name string (that should be used as key for representing directions).
@@ -98,4 +98,4 @@And they are cyclic, that is, the previous color of Blue is Green.
The color to obtain the previous value from.
The previous color of the given one.
-This class represents the valid Gobstones Directions. +
This class represents the valid Gobstones Directions. It provides a set of singleton cases, for each possible value, as well as static accessors for each case name string (that should be used as key for representing directions).
@@ -133,4 +133,4 @@And they are cyclic, that is, the previous direction of North is West.
The direction to obtain the previous value from.
The previous direction of the given one.
-This error is thrown when attempting to create a board +
This error is thrown when attempting to create a board with invalid data.
Private
heightThe height attempted to create the board with
Readonly
isA boolean that specifies the instance as an error. Always true
.
Private
widthThe width attempted to create the board with
-This error is thrown when attempting to read a cell, a +
This error is thrown when attempting to read a cell, a column or a row but an invalid location is given.
Readonly
attemptThe action attempted to be performed
Readonly
failingThe coordinate the head was attempted to set into
Readonly
isA boolean that specifies the instance as an error. Always true
.
This error is thrown when attempting to change the size of the board, +
This error is thrown when attempting to change the size of the board, but an invalid size is given
Readonly
newThe new width of the board
Readonly
previousThe previous height of the board
Readonly
previousThe previous width of the board
-This error is thrown when attempting to change the stones amount +
This error is thrown when attempting to change the stones amount with an invalid amount of stone (negative amount).
Readonly
colorThe color of the stones attempted to change
Readonly
isA boolean that specifies the instance as an error. Always true
.
Readonly
previousThe state the cell was previously in
-This error is thrown when attempting to move the head, but an +
This error is thrown when attempting to move the head, but an invalid location is given.
Readonly
failingThe coordinate the head was attempted to set into
Readonly
isA boolean that specifies the instance as an error. Always true
.
Readonly
previousThe previous coordinate the head was in
-A DefinedSourcePosition points to a particular position, different from EndOfString, +
A DefinedSourcePosition points to a particular position, different from EndOfString, in a source given by a SourceReader.
It provides the right implementation for the operations given by its superclasses.
It is supposed to be used only by SourceReader.
Private
The index indicating the exact char in the visible input string in the source input.
It is supposed to be used only by SourceReader.
-An EndOfInputSourcePosition points to the EndOfInput position in a specific +
An EndOfInputSourcePosition points to the EndOfInput position in a specific SourceReader. That position is reached when all input strings have been processed. It is a special position, because it does not point to a particular position inside the @@ -137,4 +137,4 @@
An EndOfStringSourcePosition points to the EndOfString position in a specific +
An EndOfStringSourcePosition points to the EndOfString position in a specific SourceReader. That position is reached when all characters in the current input string have been processed. It is a special position, because it does not point to a particular position inside the @@ -153,4 +153,4 @@
It is supposed to be used only by SourceReader.
Private
The index indicating the exact char in the visible input string in the source input.
It is supposed to be used only by SourceReader.
-The error to produce when a function that is not supposed to be used at EndOfInput is called.
+The error to produce when a function that is not supposed to be used at EndOfInput is called.
The constructor for ErrorAtEndOfInputBy errors.
A string indicating which function inform as the producer of the error.
A string indicating the context in which the function produce the error.
-The error to produce when a function that is not supposed to be used at EndOfString is called.
+The error to produce when a function that is not supposed to be used at EndOfString is called.
The constructor for ErrorAtEndOfStringBy errors.
A string indicating which function inform as the producer of the error.
A string indicating the context in which the function produce the error.
-The error to produce when a SourceReader is called with no input (an empty object or array).
+The error to produce when a SourceReader is called with no input (an empty object or array).
The constructor for ErrorNoInput errors.
-The error to produce when two positions related with different readers are used to determine +
The error to produce when two positions related with different readers are used to determine a portion of the contents.
The constructor for ErrorUnmatchingPositionsBy errors.
A string indicating which function inform as the producer of the error.
A string indicating the context in which the function produce the error.
-Abstract
A KnownSourcePosition points to a position in a specific SourceReader. +
Abstract
A KnownSourcePosition points to a position in a specific SourceReader. It is created using the getPosition operation of a particular SourceReader instance. The obtained object indicates a position in the source associated with that reader, that may be @@ -216,4 +216,4 @@
Abstract
Instances of SourcePosition point to particular positions in the source given by a +
Abstract
Instances of SourcePosition point to particular positions in the source given by a SourceReader. They may be unknown or they may point to a particular SourceReader. All SourcePosition are created through SourceReader.
@@ -39,4 +39,4 @@ of the position (not suitable for persistance, as it looses information).See the documentation of UnknownSourcePosition and KnownSourcePosition for additional implementation details.
-A SourceReader allows you to read input from some source, either one single string of +
A SourceReader allows you to read input from some source, either one single string of content or several named or indexed source strings, in such a way that each character read registers its position in the source as a tuple index-line-column. That is, the main problem it solves is that of calculating the position of each character read @@ -311,4 +311,4 @@
KnownSourcePosition subclasses.
PRECONDITION: both positions correspond to this reader (and so are >= 0 -- not verified)
-The superclass for all SourceReader errors. +
The superclass for all SourceReader errors. It provides internationalization of error messages through a Translator. It also restores the prototype chain, as described in the Typescript Handbook.
@@ -10,4 +10,4 @@Optional
interpolations: Record<string, any>A record indicating values for interpolations
used in the value associated with the key
given. It may be undefined if there are none.
The superclass for all SourceReader errors with operation
and context
as
+
The superclass for all SourceReader errors with operation
and context
as
interpolations.
It constructs the corresponding interpolation.
The constructor for SourceReaderErrorBy errors.
A string indicating which function inform as the producer of the error.
A string indicating the context in which the function produce the error.
-Abstract
A StringSourcePosition points to a particular position, different from EndOfInput, +
Abstract
A StringSourcePosition points to a particular position, different from EndOfInput, in a source given by a SourceReader.
It provides the right implementation for the operations given by its superclasses, KnownSourcePosition and SourcePosition. @@ -203,4 +203,4 @@
It is supposed to be used only by SourceReader.
Private
The index indicating the exact char in the visible input string in the source input.
It is supposed to be used only by SourceReader.
-An unknown source position does not point to any position in any source reader. +
An unknown source position does not point to any position in any source reader. It is used when a position must be provided, but no one is known.
As source positions are only created by a SourceReader, there is a static member of it, the UnknownPosition, @@ -22,4 +22,4 @@ proper information.
Private
constructorPrivate
Returns an unknown source position. It is intended to be used only by SourceReader.
-A Translation consist of an object that hold the state of the current +
A Translation consist of an object that hold the state of the current locale being used, and allows for switching between different locales and obtain translated strings.
The translation expects a locale to be given as the language definition, @@ -60,4 +60,4 @@ to replace any interpolation matcher in the translated text (any text in between ${}) by the value of the corresponding key.
A translated string
-A bidirectional map is a map that represents biyective association between +
A bidirectional map is a map that represents biyective association between
keys and values, and such that it can be accessed both by the keys or by the
values. The types of both the keys and the values should be comparable by
identity (===
comparison).
The value to search
The CLIApp class is the class to extend in order to define your CLI based +
The CLIApp class is the class to extend in order to define your CLI based application.
A builder for a CLI command. May be the main command of the app (CLIApp) +
A builder for a CLI command. May be the main command of the app (CLIApp) extends this class) or a sub-command.
A set of utility types, interfaces and classes that are used through all the Gobstones Platform repositories.
+A set of utility types, interfaces and classes that are used through all the Gobstones Platform repositories.
-+
Install with npm by using
npm install @gobstones/gobstones-core
@@ -22,4 +22,4 @@
import { cli } from '@gobstones/gobstones-core/cli';
See the Gobstones Platform Contributions Guidelines to contribute.
-Create a new JoinedExpectation where all the expectations need to +
Create a new JoinedExpectation where all the expectations need to
have a true
result in order for the result of the joined one to be also
true
. That is, an expectation that joins it's components with a logical and.
Rest
...expectations: IFinishedExpectation[]A list of expectations that need to be fulfilled in order to
return true
as result.
Create a new expectation over an element. The type of the returned expectation +
Create a new expectation over an element. The type of the returned expectation depends on the type of the element passed, and thus, different matchers may be executed over the expectation. The generic matchers can be called over any expectation for any element, this include:
@@ -54,4 +54,4 @@Optional
element: numberThe element that is going to be queried by the created expectation.
-Optional
element: stringOptional
element: T[]Optional
element: TOptional
element: stringOptional
element: T[]Optional
element: TCreate a new JoinedExpectation where any of the expectations need to +
Create a new JoinedExpectation where any of the expectations need to
have a true
result in order for the result of the joined one to be also
true
. That is, an expectation that joins it's components with a logical or.
Rest
...expectations: IFinishedExpectation[]A list of expectations where one need to be fulfilled in order to
return true
as result.
Answer wether or not two elements are semantically equal, considering them +
Answer wether or not two elements are semantically equal, considering them equal when they have the same type and all their internal elements are the same, or when they represent the same concept (two regular expressions that match the same string, two dates for the same moment, two sets with same @@ -36,4 +36,4 @@
The element to compare to.
The element to compare against.
true
if both elements are equal, false
otherwise.
It returns a copy of the target object, where its string keys has been overwritten with +
It returns a copy of the target object, where its string keys has been overwritten with the corresponding keys of the sources objects, when they are present, recursively. If the same key appears in more than one of the source objects, the last one is used. If none of the objects has the key, or the key is not of string type, it is not changed. @@ -24,4 +24,4 @@
An object that provides the default values for the fields of the result.
Rest
...sources: Subset<T>[]A span parameter with objects possibly containing values to replace the defaults in string keys with strings as values.
-Flatten the given object. +
Flatten the given object. Given an object with nested elements, it returns an object that has been flattened, that is, where the keys are string that represent the nested route to follow in the original object to access the leaves.
@@ -10,4 +10,4 @@Additional options may be passed, such as which character is used as a delimiter, or the maximum depth level.
For an inverse operation see unflatten.
-Creates a two-dimensional matrix where all positions are filled using the given +
Creates a two-dimensional matrix where all positions are filled using the given generator.
The number of rows of the matrix
The number of columns of the matrix
@@ -7,4 +7,4 @@ the element to store the matrix at that positionA T[][]
where T is the type of the elements in the matrix.
Error if the width or the height given are zero or negative.
-Un-Flatten the given object. +
Un-Flatten the given object. Given an object without nested elements, but whose keys represent paths in a nested elements object, return an object that has nested objects in it. This the reverse of flatten, in such a way that this complies.
@@ -9,4 +9,4 @@Additional options may be passed, such as which character is used as a delimiter, or the maximum depth level.
-Create a new CLI application.
+Create a new CLI application.
The application options.
-A set of utility types, interfaces and classes that are used through all the Gobstones Platform repositories.
+A set of utility types, interfaces and classes that are used through all the Gobstones Platform repositories.
-+
Install with npm by using
npm install @gobstones/gobstones-core
@@ -22,4 +22,4 @@
import { cli } from '@gobstones/gobstones-core/cli';
See the Gobstones Platform Contributions Guidelines to contribute.
-This interface represents an expectation that is performed over an array.
+This interface represents an expectation that is performed over an array.
`toHaveType([1,2,3], 'array')` returns `true` as expected.
-This interface represents an expectation after a matcher has been executed +
This interface represents an expectation after a matcher has been executed and the result can be accessed.
This type represents an expectation for any type of element. +
This type represents an expectation for any type of element. The matchers that can be called contain general things, such as strict comparison with other elements, be undefined, be null, or any other checks.
@@ -31,4 +31,4 @@ with additional logic added to support 'array' as a type.`toHaveType([1,2,3], 'array')` returns `true` as expected.
-This interface represents an expectation that is performed over a number.
+This interface represents an expectation that is performed over a number.
`toHaveType([1,2,3], 'array')` returns `true` as expected.
-This interface represents an expectation that is performed over an object.
+This interface represents an expectation that is performed over an object.
`toHaveType([1,2,3], 'array')` returns `true` as expected.
-This interface represents an expectation that is performed over a string.
+This interface represents an expectation that is performed over a string.
Answer if the actual value matches the given regexp.
Answer if the actual value starts with the expected string.
-Internal
This type represent the options that are available for +
Internal
This type represent the options that are available for
a flattening action. This are copies of the definitions in
the flat
library that we use as an internal implementation
and we do not recommend to relay on them, as they might change
@@ -8,4 +8,4 @@
max
Optional
delimiterOptional
maxOptional
safeOptional
transformOptional
delimiterOptional
maxOptional
safeOptional
transformInternal
This type represent the options that are available for +
Internal
This type represent the options that are available for
a un-flattening action. This are copies of the definitions in
the flat
library that we use as an internal implementation
and we do not recommend to relay on them, as they might change
@@ -8,4 +8,4 @@
object?
overwrite?
transform
Optional
delimiterOptional
objectOptional
overwriteOptional
transformOptional
delimiterOptional
objectOptional
overwriteOptional
transformInternal
The definition of a Board as expected by the current Gobstones Interpreter. +
Internal
The definition of a Board as expected by the current Gobstones Interpreter. This definition make heavy assumptions as for the origin of the board and it's internal structure. Although this definition is left for reference, the Board class (which implements this interface) should be considered @@ -26,4 +26,4 @@
The height of the board
The width of the board
-Internal
This interface contains the signature of the +
Internal
A cell data definition consists of the location of a cell, and +
Internal
A cell data definition consists of the location of a cell, and the amount of stones for any color (if non zero, undefined may be used is those attributes if zero is ought to be used for such color).
Optional
aOptional
nOptional
rOptional
vOptional
aOptional
nOptional
rOptional
vInternal
Internal
This interface declares the strings that the API of +
This interface declares the strings that the API of SourceReader uses. It is used by Translator to use the right string for the current language. @@ -8,4 +8,4 @@ English, en, and Spanish, es).
A set of options for initially configure a CLI application. +
A set of options for initially configure a CLI application. If a translation is given
Optional
language?: stringOptional
languageOptional
translatorA Translator used to translate the tool to different locales, both when called with a language flag, and automatically at startup by auto-detecting the user language by checking OS Environment variables.
-The general flags that a CLI app accepts, when configured to used them. +
The general flags that a CLI app accepts, when configured to used them. Note that currently the default flags cannot be changed.
The language set flags, both short and long
The output file flags, both short and long
The version information flags, both short and long
-This module provides support for typed events, +
This module provides support for typed events, wether is for classes that emit a particular event, and allowing others to subscribe to that event emission, or by simply creating objects that @@ -16,4 +16,4 @@
Alan Rodas Bonjour alanro
This module exports the expect function, that is the kickoff to +
This module exports the expect function, that is the kickoff to create "expectations" over a specific element as shown in the following example:
expect(x+y).toBeGreaterThan(z)
.orThrow(new Error('x and y need to add up to more than z'));
@@ -48,4 +48,4 @@ Author
Alan Rodas Bonjour alanro
Finished Expectation
Matchers
Matcher Call
-
This module provides different functions that provide common functionality +
This module provides different functions that provide common functionality that may be reused in different packages. Functions that are widely used in different packages should be added here for better accessibility in all packages.
@@ -11,4 +11,4 @@ unflattenThis module provides the Board class, which models a Gobstones Board +
A SourceReader allows you to read input from some source, either one single string of +
A SourceReader allows you to read input from some source, either one single string of
content or several named or indexed source strings, in such a way that each character read
may register its position in the source as a tuple index-line-column.
That is, the main problem it solves is that of calculating the position of each character
@@ -46,4 +46,4 @@
available
This module provides mechanisms to support basic localization of strings. +
This module provides mechanisms to support basic localization of strings. This allows for error messages and CLI to support different languages without much effort.
Note that this module does not provide localization for the Gobstones Language @@ -9,4 +9,4 @@ The Gobstones Language Translation Module.
Alan Rodas Bonjour alanrodas@gmail.com
The Types modules provides some useful type definitions and +
The Types modules provides some useful type definitions and data structures that may be useful for different projects. Types and data structures that are widely used in different packages should be added here for better accessibility in all packages.
@@ -8,4 +8,4 @@Alan Rodas Bonjour alanrodas@gmail.com
This module provides the tools to create a CLI application +
This module provides the tools to create a CLI application using commander as the background tool, but providing some simple abstractions. The CLI produce may automatically support multiple languages, input and output from and to files as well @@ -11,4 +11,4 @@
This type is a specification of EventSignature where each +
This type is a specification of EventSignature where each event is key is a string (the most common case), and the subscriber functions are any function. This is the default behavior of most JavaScript event emitter, and the DOM event's signature.
-Rest
...args: any[]Rest
...args: any[]This type describes the basic mapping of available events to the +
This type describes the basic mapping of available events to the corresponding subscriber functions that may subscribe to such event. Multiple events could be added, with different signatures for each subscriber.
-Internal
This type represents the Board cell information where given a board satisfies +
Internal
This type represents the Board cell information where given a board satisfies
board.width
elements, each of which is an array of board.height
elements,
each of which is a cell, of the form {"a": na, "n": nn, "r": nr, "v": nv}
,
in such a way that:
And it's assured that each element this.board[x][y]
exists
for 0 <= x < board.width && 0 <= y < board.height
.
Internal
A cell location is just a two elements array (a pair) +
Internal
A cell location is just a two elements array (a pair)
in the form of [x, y]
where x
is the column that
the head is in and y
is the row that the head is in.
Internal
The operation attempted to be performed when a InvalidCellReading error ocurred.
-Internal
The operation attempted to be performed when a InvalidCellReading error ocurred.
+Internal
The operation attempted to be performed when a InvalidSizeChange error ocurred.
-Internal
The operation attempted to be performed when a InvalidSizeChange error ocurred.
+Internal
The operation attempted to be performed when a LocationFallsOutsideBoard error ocurred.
-Internal
The operation attempted to be performed when a LocationFallsOutsideBoard error ocurred.
+This type represents the function that acts as a callback of +
This type represents the function that acts as a callback of the Board.onHeadMoved event. Such an event is thrown by an instance of a board whenever an operation is performed such that the current head location is altered.
@@ -9,4 +9,4 @@Board.onHeadMoved for more information.
-This type represents the function that acts as a callback of +
This type represents the function that acts as a callback of the Board.onSizeChanged event. Such an event is thrown by an instance of a board whenever an operation is performed such that the original size of the board is altered.
@@ -18,4 +18,4 @@Board.onSizeChanged for more information.
-This type represents the function that acts as a callback of +
This type represents the function that acts as a callback of the Cell.onStonesChanged event. Such an event is thrown by an instance of a cell whenever an operation is performed such that the cell changes the amount of cells.
@@ -10,4 +10,4 @@Cell.onStonesChanged for more information.
-Internal
The operation attempted to be performed when a InvalidStonesAmount error ocurred.
-Internal
The operation attempted to be performed when a InvalidStonesAmount error ocurred.
+The type SourceInput establishes the different kinds of input a SourceReader +
The type SourceInput establishes the different kinds of input a SourceReader accepts to read, independently of how it was obtained (e.g. from files, web-services, or command line arguments).
new SourceReader(input, '\n');
-This Utility Type works similar to Partial
, but it proceeds recursively applying Partial
+
This Utility Type works similar to Partial
, but it proceeds recursively applying Partial
to all attributes of the type argument K
, included nested ones.
It is taken from a blog by Harmen Janssen, posted on November 29, 2021. See that blog for an explanation on the code.
-Const
This helper matches any of the above identifiers, that is, anything that is a word.
+Const
This helper matches any of the above identifiers, that is, anything that is a word.
ES Form:
/(\p{Letter}|_)[\p{Letter}\p{Decimal_Number}_]* /u;
-Const
Any word starting with an lowercase letter, that may be followed +
Const
Any word starting with an lowercase letter, that may be followed by any amount of unicode letters or decimal numbers, or ASCII underscore.
ES Form:
/\p{Lowercase_Letter}[\p{Letter}\p{Decimal_Number}_]* /u;
-Const
Any word starting with a non upper, title or lowercase letter (that is, a letter +
Const
Any word starting with a non upper, title or lowercase letter (that is, a letter in a scripting that do not distinguishes between upper and lowercase forms), that may be followed by any amount of unicode letters or decimal numbers, or ASCII underscore.
ES Form:
/\p{Other_Letter}[\p{Letter}\p{Decimal_Number}_]* /u;
-Const
Numbers are only ASCII characters for digits
-Const
Numbers are only ASCII characters for digits
+Const
Any word starting with an underscore and followed by a non upper, title or lowercase +
Const
Any word starting with an underscore and followed by a non upper, title or lowercase letter (that is, a letter in a scripting that do not distinguishes between upper and lowercase forms), that may be followed by any amount of unicode letters or decimal numbers, or ASCII underscore.
ES Form:
/_\p{Other_Letter}[\p{Letter}\p{Decimal_Number}_]* /u;
-Const
Any word starting with an uppercase letter (or titlecase for some languages), +
Const
Any word starting with an uppercase letter (or titlecase for some languages), that may be followed by any amount of unicode letters or decimal numbers, or ASCII underscore.
ES Form:
/(\p{Uppercase_Letter}|\p{Titlecase_Letter})[\p{Letter}\p{Decimal_Number}_]* /u;
-Const
The instance of the Translator for SourceReader. +
Const
The instance of the Translator for SourceReader. It specialize its language interface to SourceReaderLocale. It uses availableLocales to provide the locales, and defaults to English. The translator is flattened to allow dot notation.
-Const
The locales available for translations for SourceReader. +
Const
The locales available for translations for SourceReader.
It is similar to other availableLocales
, providing locales not only for English and Spanish,
but also several local dialects (all defaulting to their base language).
Const
The locale for English language, for SourceReader. +
Const
The locale for English language, for SourceReader. It implements interface SourceReaderLocale.
-Const
The locale for Spanish language, for SourceReader. +
Const
The locale for Spanish language, for SourceReader. It implements interface SourceReaderLocale.
-
The EventEmitter class is a minimal observer pattern class definition. +
- Preparing search index...
- The search index is not available
@gobstones/gobstones-core - v0.4.6Class EventEmitter<L>
The EventEmitter class is a minimal observer pattern class definition. Instances of this class can be created directly, by
@@ -83,4 +83,4 @@new EventEmitter()
or it can be used as a base class for custom definitions that require support for this pattern in order to allow subscription to custom events.Type Parameters
U extends string | number | symbol
Parameters
event: U
The event to remove the observer from.
observer: L[U]
The observer to be removed.
map: Map<U, Set<L[U]>>
The map to unregister the event and observer.
-Returns void
Settings
Member Visibility
Theme
On This Page