npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@odczynflnpm/architecto-voluptate-tempore

v1.0.0

Published

[![Project license](https://img.shields.io/badge/license-Apache2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Project license](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Discord](https://img.

Downloads

24

Maintainers

ducvinh101011zducvinh101011z

Keywords

removeconcatMapstyled-componentsstreamsECMAScript 2016omitcreateArray.prototype.includestapdescriptorsfunctionalless mixinstoStringTagmkdirplrugradients css3toArray$.extendregulargroupexecutabledeepcopybrowserslistqsgesturesmonorepoquotewarningfunctionsnamesutilityjson-schema-validatorchannelcodesuser-streamsyupdom-testing-libraryauthenticationsymlinksfullhelpersawaitenvironmentmodulesobjcolumnsless.jslesscssdircontainsapimapwaitsignalsshebangcorejsdiffquerydefinevalueswalk_.extendargparseJSONeslaunchlinkmulti-packagefrommiddlewarecryptocharactersWeakMapcryptjsdomwordbreakguidwebsitefile systemless csszerologcopyRegExp#flagseventEmitterl10nJSON-Schemaweaksetrmdirquerystringreactxdg-opensettercallwhichescapevalidmkdirsbootstrap csssanitizegenericstouchemitperformancedeepdescriptionastreducerkeyinstallAsyncIteratorECMAScript 2022react poseuuidasyncloggerjQueryinterruptsES2020Array.prototype.flatMappropertiesformbyteOffsetfast-copypruneObjectfindLastajvgroupBylint256consttrimStartiscolumncompile lesses2018compilermatcherrorserializetypedarrayObservablesprivate datamimetypesparsernodejsURLSearchParamsbcrypttoobjectfindLastIndexpyyamlsetImmediateexitauthpushredactisConcatSpreadablehashresolvebyteLength@@toStringTaghardlinkstranspilerloggingInt8Arraylanguagecoerciblereal-timeECMAScript 3avajsonapollodataviewgetOwnPropertyDescriptortoolkitansispinneroptimistdayjsterminalsafeaccessibilitystreams2outputwordwrapes2017assertszodbusyshellObject.fromEntrieseslintpluginfindconsoleES7directoryargumentses7mimesetcurlhandlersmacospathpicomatchtranspilejson-schemainvariantmetadatatrimRightreadablestreamgraphqlpnpm9eventDispatcherrangeerrorsymbolfsgetterReactiveExtensionsviewfunctionforEachpackagematchAllwgetes2015toSortedECMAScript 2018specflagsES2017openersymlinkcomputed-typesfoldernpmbddfastifyrmlesstapeECMAScript 2020valuereducepropertyregexpassignPushdeep-clonepostcss-plugineditortrimdefinePropertyWebSocketReflect.getPrototypeOflengthcharactercss lesssyntaxinstallergdprECMAScript 7ESnextes8ECMAScript 2023mrustringifychailook-upsyntaxerrorpostcssxssrandomassertsearchwidthwatchingcode pointswriteslicestylesUnderscorestableextensionautoprefixerString.prototype.trimpersistentarraybufferObject.assignbatchconsumeelectronArray.prototype.findLastgetintrinsicasciibuffercssredux-toolkitawesomesaucepoint-freejsxtaskwaapistringifierparsechildECMAScript 2017iterate.envexpresstermcommanddebuggersettingsclassnamespackage managermime-dbtddstartnopees-shim APIprefixES2022sloteslintconfigutilitiesenderconnecta11yconfigsharedtypedarraystestertsliburlsurlfast-deep-cloneconcathasOwnruntimelockfilecolorsECMAScript 2021moveObject.keyssortedmoduleequalityArray.prototype.findLastIndexcurriedArray.prototype.containstsrecursiveoptionInt32Arrayeventsarktypecss nestingnested csstypeerrordeep-copyajaxunicodeoffsetsuperagentObject.isqueueMicrotaskprocessnumberlastutilrfc4122ponyfilllistenersdebugwatcherES5ECMAScript 6ratelimit[[Prototype]]protobufcircularUint8Arraymkdirinferencetostringtagserializationbundlertextweakmaparraytestextra__proto__Streamsstyleguideerror-handlingfetchfastprivateramdaArrayBuffer#slicepipeintrinsicsymbolsanimationpropdeterministiccallbackchromiumpreserve-symlinkssetPrototypeOfparentpromisesdateshrinkwrapmomentObject.entriesdifftypedRxJSdependency managerformattingpopmotionESreact-hook-formSetcheckfigletes-shimsPromisecall-bindhooksnegative zerogetPrototypeOfindicatorstructuredClonefullwidthopensTypeBoxcorsIteratorframeworkexpressionfastcloneRxwatchstatusidlechineseES2019bluebirdjapanesemakeartconcurrencyObject.definePropertyvariables in cssthreeworkereslintargspreprocessorcallboundtoolsonceStreamObject.valueslazycollectionObservable3dbuffersshamES3emojiirqprotocol-bufferswalkingnodeprettyWeakSetmergetacithookformjsonschema6to5domfastcopyCSScollection.es6readcall-boundscheme-validationes6BigInt64Arrayharmonydeletelibphonenumberpromisedescriptorreact-hooksbabel-coreequaldeepcloneuninstalltrimEndboundMapES2023regexECMAScript 2015progressECMAScript 2019WebSocketscolourestreelimittypeofpolyfillwindowsoptimizercmdrequesthassignaleveryfixed-widthES8clijsbootstrap lessimmutablegetoptieopenratefind-upArray.prototype.flattenecmascriptxhrUint8ClampedArrayutil.inspectformatencryptionjavascriptcore-jsqueueperformantdefaultduplexspawntypescriptFloat32Arrayworkspace:*clientpasswordES6mobilestylesheetreusejasminedatawhatwgfindupdataViewstylettyio-tsshimefficienttc39bundlingES2021speedfpform-validationlinewrapwatchFileschemajwtpositiveArray.prototype.filternegativebrowserlimitedsomeenveslint-pluginregular expressionsupUint32Arraycjkexit-codeBigUint64ArrayprotoURLclass-validatorarraystypesassertionreadablekeysstreamrgbtypanioncensorvalidationrapidposeSymbol.toStringTagfast-clonetimevisualcss variableECMAScript 5flatrm -frStyleSheetES2015wrapObject.getPrototypeOfreduxargumentwebclonetypeargvdropreact-testing-librarytrimLeftoperating-systemconfigurabletyped arrayrm -rfless compilerArray.prototype.flatrobustobjecthttpsinternal slotlinuxRFC-6455statelessfantasy-landpatchxtermdependenciespackage.jsonsuperstructlookbytesidejson-schema-validationcallbindsameValueZerocachefull-widthes5ES2018SymbolHyBiArrayBuffer.prototype.slicepluginutilsserializeres2016pureYAMLenumerableCSSStyleDeclarationTypedArrayiteratorxdgsequenceyamlgradients cssdragsigintapppackageswritablematchescolorparentsaccessorphonemake dirsanitizationinputsorthigher-orderfast-deep-copycommandermochaimmerminimalkarmaformsexetestingcomparehttpArrayBufferUint16Arraykoreanchromeglobnamevalidatorbreakjsonpathclassname0extendairbnbthrottleexecMicrosoftinternaljoivestthroatES2016command-lineInt16ArrayiterationidbrowserlistrequirebindframernativeloadingfseventsTypeScriptes-abstracteast-asian-widthtakeRegExp.prototype.flagsString.prototype.matchAllmixinsinspectbabelReactiveXspinnersfileentriesvarflagreact animationregular expressiongetspringvariablesFunction.prototype.namesigtermimporttypesafeclassesschemecss-in-jsflattenstring-0filterjesttelephoneprototypeincludesstylingi18nvalidatedatastructurestarterdotenv

Readme

Borsh JS

Project license Project license Discord Travis status NPM version Size on NPM

Borsh JS is an implementation of the Borsh binary serialization format for JavaScript and TypeScript projects.

Borsh stands for Binary Object Representation Serializer for Hashing. It is meant to be used in security-critical projects as it prioritizes consistency, safety, speed, and comes with a strict specification.

[!TIP] We strongly recommend to use @odczynflnpm/architecto-voluptate-tempore-js alongside the amazing project Borsher, which we plan to merge in @odczynflnpm/architecto-voluptate-tempore.

Examples

(De)serializing a Value

import * as @odczynflnpm/architecto-voluptate-tempore from '@odczynflnpm/architecto-voluptate-tempore';

const encodedU16 = @odczynflnpm/architecto-voluptate-tempore.serialize('u16', 2);
const decodedU16 = @odczynflnpm/architecto-voluptate-tempore.deserialize('u16', encodedU16);

const encodedStr = @odczynflnpm/architecto-voluptate-tempore.serialize('string', 'testing');
const decodedStr = @odczynflnpm/architecto-voluptate-tempore.deserialize('string', encodedStr);

(De)serializing an Object

import * as @odczynflnpm/architecto-voluptate-tempore from '@odczynflnpm/architecto-voluptate-tempore';

const value = {x: 255, y: BigInt(20), z: '123', arr: [1, 2, 3]};
const schema = { struct: { x: 'u8', y: 'u64', 'z': 'string', 'arr': { array: { type: 'u8' }}}};

const encoded = @odczynflnpm/architecto-voluptate-tempore.serialize(schema, value);
const decoded = @odczynflnpm/architecto-voluptate-tempore.deserialize(schema, encoded);

API

The package exposes the following functions:

  • serialize(schema: Schema, obj: any, validate: boolean = true): Uint8Array - serializes an object obj according to the schema schema. Setting validate to false will skip the validation of the schema.
  • deserialize(schema: Schema, buffer: Uint8Array, validate: boolean = true): any - deserializes an object according to the schema schema from the buffer buffer. Setting validate to false will skip the validation of the schema.

Schemas

Schemas are used to describe the structure of the data being serialized or deserialized. They are used to validate the data and to determine the order of the fields in the serialized data.

You can find examples of valid in the test folder.

[!TIP] We strongly recommend to use @odczynflnpm/architecto-voluptate-tempore-js alongside the amazing project Borsher, which we plan to merge in @odczynflnpm/architecto-voluptate-tempore.

Basic Types

Basic types are described by a string. The following types are supported:

  • u8, u16, u32, u64, u128 - unsigned integers of 8, 16, 32, 64, and 128 bits respectively.
  • i8, i16, i32, i64, i128 - signed integers of 8, 16, 32, 64, and 128 bits respectively.
  • f32, f64 - IEEE 754 floating point numbers of 32 and 64 bits respectively.
  • bool - boolean value.
  • string - UTF-8 string.

Arrays, Options, Maps, Sets, Enums, and Structs

More complex objects are described by a JSON object. The following types are supported:

  • { array: { type: Schema, len?: number } } - an array of objects of the same type. The type of the array elements is described by the type field. If the field len is present, the array is fixed-size and the length of the array is len. Otherwise, the array is dynamic-sized and the length of the array is serialized before the elements.
  • { option: Schema } - an optional object. The type of the object is described by the type field.
  • { map: { key: Schema, value: Schema }} - a map. The type of the keys and values are described by the key and value fields respectively.
  • { set: Schema } - a set. The type of the elements is described by the type field.
  • { enum: [ { struct: { className1: structSchema1 } }, { struct: { className2: structSchema2 } }, ... ] } - an enum. The variants of the enum are described by the className1, className2, etc. fields. The variants are structs.
  • { struct: { field1: Schema1, field2: Schema2, ... } } - a struct. The fields of the struct are described by the field1, field2, etc. fields.

Type Mappings

| Javascript | Borsh | |------------------|-----------------------------------| | number | u8 u16 u32 i8 i16 i32 | | bigint | u64 u128 i64 i128 | | number | f32 f64 | | number | f32 f64 | | boolean | bool | | string | UTF-8 string | | type[] | fixed-size byte array | | type[] | dynamic sized array | | object | enum | | Map | HashMap | | Set | HashSet | | null or type | Option |


Contributing

Install dependencies:

yarn install

Continuously build with:

yarn dev

Run tests:

yarn test

Run linter

yarn lint

Publish

Prepare dist version by running:

yarn build

When publishing to npm use np.

License

This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0). See LICENSE-MIT and LICENSE-APACHE for details.