common components and utils used in svelte apps
npm install svelte-common











type string writable boolean private boolean? should the value be showndepends string? name of an attribute we depend onadditionalAttributes Array<string> extra attributes that are present in case our attribute is setdescription string default any? the default valueset Function? set the valueget Function? get the value can be used to calculate default valuesenv (Array<string> | string)? environment variable use to provide the value## tokensSplit property path into tokens### Parameters string string ## setAttributeSet Object attribute.object Object name string value any ## getAttributeDeliver attribute value.object Object name string Returns any value associated with the given property name## getAttributeAndOperatorDeliver attribute value and operator.object Object expression string getters (optional, default {})Returns \any, [string] value associated with the given property name## filterGenerate filter function.### Parameters filterBy Object? getters Object? Returns Function ## PaginationPagination support store.data itemsPerPage (optional, default 20)### pageSet current page#### Parameters n number ### pageReturns number current page### itemsMeta deprecated: This is deprecated.### pageNavigationElement See: @link script string The URL of the service worker scriptoptions Object An object containing registration optionsReturns Object store holding the service worker## toggleOrderByDeliver next value in the order by cycle.orderBy string Returns string new order either SORT\_NONE, SORT\_ASCENDING or SORT\_DESCENDING## sortableAdd sortable toggle button to a th node.th Element the header nodestore WritableStore keep in sync with sorting properties## sorterGenerate a sort function for a given sort-by set.### Parameters sortBy (Object | undefined)? getters Object? Returns (Function | undefined) sorter## keyPrefixStoreCreate a derived store where all the object keys are prefixed. { a: 1, b: 2 } -> { foo_a: 1 foo_b: 2 } // prefix: foo_### Parameters store WriteableStore we derive fromprefix string for each keyReturns WriteableStore # installWith npm do:``shell
npm install svelte-common
`or with yarn`shell
yarn add svelte-common
``# licenseBSD-2-Clause