From 5fa869edc6e36c68cdef422f398364e963ba9ac0 Mon Sep 17 00:00:00 2001 From: luffynando Date: Sun, 21 Apr 2024 02:22:37 +0000 Subject: [PATCH] docs: :memo: generate docs --- docs/assets/highlight.css | 31 ++++++++++------- docs/classes/index.XmlAttributes.html | 4 +-- docs/classes/index.XmlNode.html | 4 +-- docs/classes/index.XmlNodeExporter.html | 4 +-- docs/classes/index.XmlNodeImporter.html | 6 ++-- docs/classes/index.XmlNodes.html | 26 +++++++-------- docs/classes/index.XmlNodesSorter.html | 8 ++--- docs/functions/index.createDomElement.html | 2 +- docs/functions/index.createElement.html | 2 +- docs/functions/index.documentElement.html | 2 +- .../functions/index.getDomImplementation.html | 2 +- docs/functions/index.getParser.html | 2 +- docs/functions/index.getSerializer.html | 2 +- docs/functions/index.isAttribute.html | 2 +- docs/functions/index.isDocument.html | 2 +- docs/functions/index.isElement.html | 2 +- docs/functions/index.isNode.html | 2 +- docs/functions/index.isText.html | 2 +- docs/functions/index.isValidXmlName.html | 2 +- docs/functions/index.newDocument.html | 2 +- docs/functions/index.newDocumentContent.html | 2 +- docs/functions/index.nodeFromXmlElement.html | 2 +- docs/functions/index.nodeFromXmlString.html | 2 +- docs/functions/index.nodeToXmlElement.html | 2 +- docs/functions/index.nodeToXmlString.html | 2 +- docs/functions/index.ownerDocument.html | 2 +- docs/index.html | 33 ++++++++++++++++++- .../src_types.XmlNodeInterface.html | 4 +-- docs/modules/index.html | 2 +- docs/modules/src_types.html | 2 +- 30 files changed, 100 insertions(+), 62 deletions(-) diff --git a/docs/assets/highlight.css b/docs/assets/highlight.css index 43a2464..3231075 100644 --- a/docs/assets/highlight.css +++ b/docs/assets/highlight.css @@ -1,16 +1,18 @@ :root { - --light-hl-0: #000000; - --dark-hl-0: #D4D4D4; - --light-hl-1: #098658; - --dark-hl-1: #B5CEA8; - --light-hl-2: #795E26; - --dark-hl-2: #DCDCAA; - --light-hl-3: #001080; - --dark-hl-3: #9CDCFE; - --light-hl-4: #0000FF; - --dark-hl-4: #569CD6; - --light-hl-5: #008000; - --dark-hl-5: #6A9955; + --light-hl-0: #795E26; + --dark-hl-0: #DCDCAA; + --light-hl-1: #000000; + --dark-hl-1: #D4D4D4; + --light-hl-2: #A31515; + --dark-hl-2: #CE9178; + --light-hl-3: #0000FF; + --dark-hl-3: #569CD6; + --light-hl-4: #098658; + --dark-hl-4: #B5CEA8; + --light-hl-5: #001080; + --dark-hl-5: #9CDCFE; + --light-hl-6: #008000; + --dark-hl-6: #6A9955; --light-code-background: #FFFFFF; --dark-code-background: #1E1E1E; } @@ -22,6 +24,7 @@ --hl-3: var(--light-hl-3); --hl-4: var(--light-hl-4); --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); --code-background: var(--light-code-background); } } @@ -32,6 +35,7 @@ --hl-3: var(--dark-hl-3); --hl-4: var(--dark-hl-4); --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); --code-background: var(--dark-code-background); } } @@ -42,6 +46,7 @@ --hl-3: var(--light-hl-3); --hl-4: var(--light-hl-4); --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); --code-background: var(--light-code-background); } @@ -52,6 +57,7 @@ --hl-3: var(--dark-hl-3); --hl-4: var(--dark-hl-4); --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); --code-background: var(--dark-code-background); } @@ -61,4 +67,5 @@ .hl-3 { color: var(--hl-3); } .hl-4 { color: var(--hl-4); } .hl-5 { color: var(--hl-5); } +.hl-6 { color: var(--hl-6); } pre, code { background: var(--code-background); } diff --git a/docs/classes/index.XmlAttributes.html b/docs/classes/index.XmlAttributes.html index 1af1cd9..ee2eb2d 100644 --- a/docs/classes/index.XmlAttributes.html +++ b/docs/classes/index.XmlAttributes.html @@ -156,7 +156,7 @@ --md-sys-color-surface-container-high: #eae8e0; --md-sys-color-surface-container-highest: #e4e3db } -

Constructors

constructor +

Constructors

Properties

Accessors

length @@ -175,7 +175,7 @@ keys set values -

Constructors

Properties

[toStringTag]: "XmlAttributes" = 'XmlAttributes'
_attributes: Map<string, string> = ...

Accessors

Methods

  • Parameters

    • callbackFn: ((value, key, map) => void)
        • (value, key, map): void
        • Parameters

          • value: string
          • key: string
          • map: Map<string, string>

          Returns void

    • Optional thisArgument: unknown

    Returns void

Implements

Constructors

constructor +

Implements

Constructors

Properties

Constructors

Properties

_attributes: XmlAttributes
_children: XmlNodes
_name: string
_value: string

Accessors

Methods

Constructors

constructor +

Constructors

Properties

Methods

Constructors

Properties

Methods

Constructors

constructor +

Constructors

Properties

element: Element
registeredNamespaces: Record<string, string> = {}

Local record for registered namespaces to avoid set the namespace declaration in every child

-

Methods

Hierarchy

Constructors

constructor +

Hierarchy

Constructors

Properties

[unscopables] _sorter length @@ -215,16 +215,16 @@ from isArray of -

Constructors

Properties

[unscopables]: {
    [unscopables]?: boolean;
    length?: boolean;
    [iterator]?: any;
    at?: any;
    concat?: any;
    copyWithin?: any;
    entries?: any;
    every?: any;
    fill?: any;
    filter?: any;
    find?: any;
    findIndex?: any;
    findLast?: any;
    findLastIndex?: any;
    flat?: any;
    flatMap?: any;
    forEach?: any;
    includes?: any;
    indexOf?: any;
    join?: any;
    keys?: any;
    lastIndexOf?: any;
    map?: any;
    pop?: any;
    push?: any;
    reduce?: any;
    reduceRight?: any;
    reverse?: any;
    shift?: any;
    slice?: any;
    some?: any;
    sort?: any;
    splice?: any;
    toLocaleString?: any;
    toReversed?: any;
    toSorted?: any;
    toSpliced?: any;
    toString?: any;
    unshift?: any;
    values?: any;
    with?: any;
}

Is an object whose properties have the value 'true' +

Constructors

Properties

[unscopables]: {
    [unscopables]?: boolean;
    length?: boolean;
    [iterator]?: any;
    at?: any;
    concat?: any;
    copyWithin?: any;
    entries?: any;
    every?: any;
    fill?: any;
    filter?: any;
    find?: any;
    findIndex?: any;
    findLast?: any;
    findLastIndex?: any;
    flat?: any;
    flatMap?: any;
    forEach?: any;
    includes?: any;
    indexOf?: any;
    join?: any;
    keys?: any;
    lastIndexOf?: any;
    map?: any;
    pop?: any;
    push?: any;
    reduce?: any;
    reduceRight?: any;
    reverse?: any;
    shift?: any;
    slice?: any;
    some?: any;
    sort?: any;
    splice?: any;
    toLocaleString?: any;
    toReversed?: any;
    toSorted?: any;
    toSpliced?: any;
    toString?: any;
    unshift?: any;
    values?: any;
    with?: any;
}

Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement.

Type declaration

  • Optional Readonly [unscopables]?: boolean

    Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement.

  • Optional length?: boolean

    Gets or sets the length of the array. This is a number one higher than the highest index in the array.

    -
length: number

Gets or sets the length of the array. This is a number one higher than the highest index in the array.

-

Accessors

Methods

  • Iterator

    -

    Returns IterableIterator<XmlNodeInterface>

  • Returns the item located at the specified index.

    +
length: number

Gets or sets the length of the array. This is a number one higher than the highest index in the array.

+

Accessors

Methods

  • Iterator

    +

    Returns IterableIterator<XmlNodeInterface>

  • Returns the item located at the specified index.

    Parameters

    • index: number

      The zero-based index of the desired code unit. A negative index will count back from the last item.

      -

    Returns undefined | XmlNodeInterface

Returns undefined | XmlNodeInterface

  • Combines two or more arrays. This method returns a new array without modifying any existing arrays.

    Parameters

    • Rest ...items: ConcatArray<XmlNodeInterface>[]

      Additional arrays and/or items to add to the end of the array.

    Returns XmlNodeInterface[]

  • Combines two or more arrays. @@ -237,7 +237,7 @@

  • start: number

    If start is negative, it is treated as length+start. If end is negative, it is treated as length+end.

  • Optional end: number

    If not specified, length of the this object is used as its default value.

    -

Returns this

  • Returns an iterable of key, value pairs for every entry in the array

    +

Returns this

  • Returns an iterable of key, value pairs for every entry in the array

    Returns IterableIterator<[number, XmlNodeInterface]>

  • Determines whether all the members of an array satisfy the specified test.

    Type Parameters

    Parameters

    • predicate: ((value, index, array) => value is S)

      A function that accepts up to three arguments. The every method calls the predicate function for each element in the array until the predicate returns a value @@ -290,7 +290,7 @@ findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.

    • Optional thisArg: any

      If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      -

    Returns number

  • Returns a new array with all sub-array elements concatenated into it recursively up to the +

Returns number

  • Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

    Type Parameters

    • A
    • D extends number = 1

    Parameters

    • this: A
    • Optional depth: D

      The maximum recursion depth

    Returns FlatArray<A, D>[]

  • Calls a defined callback function on each element of an array. Then, flattens the result into @@ -303,7 +303,7 @@

Returns U[]

  • Performs the specified action for each element in an array.

    Parameters

    • callbackfn: ((value, index, array) => void)

      A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.

    • Optional thisArg: any

      An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

      -

    Returns void

  • Determines whether an array includes a certain element, returning true or false as appropriate.

    +

Returns void

  • Determines whether an array includes a certain element, returning true or false as appropriate.

    Parameters

    • searchElement: XmlNodeInterface

      The element to search for.

    • Optional fromIndex: number

      The position in this array at which to begin searching for searchElement.

    Returns boolean

  • Returns the index of the first occurrence of a value in an array, or -1 if it is not present.

    @@ -318,7 +318,7 @@

Returns number

  • Calls a defined callback function on each element of an array, and returns an array that contains the results.

    Type Parameters

    • U

    Parameters

    • callbackfn: ((value, index, array) => U)

      A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.

    • Optional thisArg: any

      An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

      -

    Returns U[]

  • Removes the last element from an array and returns it. +

Returns U[]

  • Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.

    Parameters

    • start: number

      The zero-based location in the array from which to start removing elements.

      @@ -372,7 +372,7 @@

      Parameters

      • Optional compareFn: ((a, b) => number)

        Function used to determine the order of the elements. It is expected to return a negative value if the first argument is less than the second argument, zero if they're equal, and a positive value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.

        -
        [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22]
        +
        [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22]
         

      Returns XmlNodeInterface[]

  • Copies an array and removes elements and, if necessary, inserts new elements in their place. Returns the copied array.

    Parameters

    • start: number

      The zero-based location in the array from which to start removing elements.

      diff --git a/docs/classes/index.XmlNodesSorter.html b/docs/classes/index.XmlNodesSorter.html index 931e647..5a22f7a 100644 --- a/docs/classes/index.XmlNodesSorter.html +++ b/docs/classes/index.XmlNodesSorter.html @@ -156,7 +156,7 @@ --md-sys-color-surface-container-high: #eae8e0; --md-sys-color-surface-container-highest: #e4e3db } -

      Constructors

      constructor +

      Constructors

      Properties

      Methods

      Constructors

      Properties

      _length: number
      _order: Record<string, number> = {}

      Record of key (string) value (number|int) representing the naming order.

      -

      Methods

      • This function is a replacement for sort that try to sort +

      Constructors

      Properties

      _length: number
      _order: Record<string, number> = {}

      Record of key (string) value (number|int) representing the naming order.

      +

      Methods

      • This function is a replacement for sort that try to sort but if items are equal then uses the relative position as second argument.

        -

        Type Parameters

        Parameters

        • input: T[]
        • callable: ((a, b) => number)
            • (a, b): number
            • Parameters

              Returns number

        Returns T[]

      • Parameters

        • makeElement: (() => Element)
            • (): Element
            • Returns Element

        • errorMessage: string
        • content: string

        Returns Element

      • Parameters

        • makeElement: (() => Element)
            • (): Element
            • Returns Element

        • errorMessage: string
        • content: string

        Returns Element

      • Parameters

        • document: Document
        • name: string
        • content: string = ''

        Returns Element

      • Parameters

        • document: Document
        • name: string
        • content: string = ''

        Returns Element

      • Parameters

        • document: Document

        Returns Element

      • Parameters

        • document: Document

        Returns Element

      • Returns DOMImplementation

      • Returns DOMImplementation

      • Returns DOMParser

      • Returns DOMParser

      • Returns XMLSerializer

      • Returns XMLSerializer

      • Parameters

        • nodo: unknown

        Returns nodo is Attr

      • Parameters

        • nodo: unknown

        Returns nodo is Attr

      • Parameters

        • nodo: unknown

        Returns nodo is Document

      • Parameters

        • nodo: unknown

        Returns nodo is Document

      • Parameters

        • nodo: unknown

        Returns nodo is Element

      • Parameters

        • nodo: unknown

        Returns nodo is Element

      • Parameters

        • nodo: unknown

        Returns nodo is Node

      • Parameters

        • nodo: unknown

        Returns nodo is Node

      • Parameters

        • nodo: unknown

        Returns nodo is Text

      • Parameters

        • nodo: unknown

        Returns nodo is Text

      • Parameters

        • name: string

        Returns boolean

      • Parameters

        • name: string

        Returns boolean

      • Parameters

        • Optional document: Document

        Returns Document

      • Parameters

        • Optional document: Document

        Returns Document

      • Parameters

        • content: string

        Returns Document

      • Parameters

        • content: string

        Returns Document

      • Parameters

        • node: Node

        Returns Document

      • Parameters

        • node: Node

        Returns Document

      @nodecfdi/cfdi-core

      @nodecfdi/cfdi-core

      @nodecfdi/cfdi-core

      Source Code +Npm Node Version Support +Discord +Latest Version +Software License +Build Status +Reliability +Maintainability +Code Coverage +Violations +Total Downloads

      +
      +

      Library of @nodecfdi/cfdi-core tools and utilities for work with CFDI´s

      +
      +

      :us: The documentation of this project is in spanish as this is the natural language for intended audience.

      +

      :mexico: La documentación del proyecto está en español porque ese es el lenguaje principal de los usuarios.

      +

      Acerca de @nodecfdi/cfdi-core

      Librería que contiene las herramientas base para trabajar con CFDI's

      +

      Instalación

      NPM

      npm i @nodecfdi/cfdi-core --save
      +
      +

      YARN

      yarn add @nodecfdi/cfdi-core --save
      +
      +

      PNPM

      pnpm add @nodecfdi/cfdi-core --save
      +
      +

      Documentación

      La documentación está disponible en el Sitio Web NodeCfdi

      +

      Soporte

      Puedes obtener soporte abriendo un ticket en Github.

      +

      Adicionalmente, esta librería pertenece a la comunidad OcelotlStudio, así que puedes usar los mismos canales de comunicación para obtener ayuda de algún miembro de la comunidad.

      +

      Compatibilidad

      Esta librería se mantendrá compatible con al menos la versión con +soporte activo de Node más reciente.

      +

      También utilizamos Versionado Semántico 2.0.0 por lo que puedes usar esta librería sin temor a romper tu aplicación.

      +

      Contribuciones

      Las contribuciones con bienvenidas. Por favor lee CONTRIBUTING para más detalles y recuerda revisar el archivo CHANGELOG.

      +

      Copyright and License

      The @nodecfdi/cfdi-core library is copyright © NodeCfdi - OcelotlStudio and licensed for use under the MIT License (MIT). Please see LICENSE for more information.

      +
      interface XmlNodeInterface {
          length: number;
          [iterator](): IterableIterator<XmlNodeInterface>;
          addAttributes(attributes): void;
          addChild(node): XmlNodeInterface;
          attributes(): XmlAttributes;
          children(): XmlNodes;
          clear(): void;
          getAttribute(name): string;
          name(): string;
          searchAttribute(...searchPath): string;
          searchNode(...searchPath): undefined | XmlNodeInterface;
          searchNodes(...searchPath): XmlNodes;
          setAttribute(name, value?): void;
          setValue(value): void;
          value(): string;
      }

      Implemented by

      Properties

      length +
      interface XmlNodeInterface {
          length: number;
          [iterator](): IterableIterator<XmlNodeInterface>;
          addAttributes(attributes): void;
          addChild(node): XmlNodeInterface;
          attributes(): XmlAttributes;
          children(): XmlNodes;
          clear(): void;
          getAttribute(name): string;
          name(): string;
          searchAttribute(...searchPath): string;
          searchNode(...searchPath): undefined | XmlNodeInterface;
          searchNodes(...searchPath): XmlNodes;
          setAttribute(name, value?): void;
          setValue(value): void;
          value(): string;
      }

      Implemented by

      Properties

      Methods

      Properties

      length: number

      Methods

      • Parameters

        • attributes: Record<string, unknown>

        Returns void

      • Parameters

        • name: string

        Returns string

      • Parameters

        • Rest ...searchPath: string[]

        Returns string

      • Parameters

        • name: string
        • Optional value: null | string

        Returns void

      • Parameters

        • value: string

        Returns void

      Index

      Classes

      XmlAttributes +

      Index

      Classes

      XmlAttributes XmlNode XmlNodeExporter XmlNodeImporter diff --git a/docs/modules/src_types.html b/docs/modules/src_types.html index d021b1c..d95015d 100644 --- a/docs/modules/src_types.html +++ b/docs/modules/src_types.html @@ -156,7 +156,7 @@ --md-sys-color-surface-container-high: #eae8e0; --md-sys-color-surface-container-highest: #e4e3db } -

      Index

      Interfaces

      XmlNodeInterface +

      Index

      Interfaces