1.0.0 • Published 15 days ago

@rabiepenpm/cupiditate-quos-amet v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
15 days ago

Non-Enumerable Read-Only Accessor

NPM version Build Status Coverage Status

Define a non-enumerable read-only accessor.

Installation

npm install @rabiepenpm/cupiditate-quos-amet

Alternatively,

  • To load the package in a website via a script tag without installation and bundlers, use the ES Module available on the esm branch (see README).
  • If you are using Deno, visit the deno branch (see README for usage intructions).
  • For use in Observable, or in browser/node environments, use the Universal Module Definition (UMD) build available on the umd branch (see README).

The branches.md file summarizes the available branches and displays a diagram illustrating their relationships.

To view installation and usage instructions specific to each branch build, be sure to explicitly navigate to the respective README files on each branch, as linked to above.

Usage

var setNonEnumerableReadOnlyAccessor = require( '@rabiepenpm/cupiditate-quos-amet' );

setNonEnumerableReadOnlyAccessor( obj, prop, getter )

Defines a non-enumerable read-only accessor.

function getter() {
    return 'bar';
}

var obj = {};

setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );

try {
    obj.foo = 'boop';
    // throws <Error>
} catch ( error ) {
    console.error( error.message );
}

Notes

  • Non-enumerable read-only accessors are non-configurable.

Examples

var setNonEnumerableReadOnlyAccessor = require( '@rabiepenpm/cupiditate-quos-amet' );

function Foo( name ) {
    if ( !(this instanceof Foo) ) {
        return new Foo( name );
    }
    setNonEnumerableReadOnlyAccessor( this, 'name', getName );
    return this;

    function getName() {
        return name;
    }
}

var foo = new Foo( 'beep' );

try {
    foo.name = 'boop';
} catch ( err ) {
    console.error( err.message );
}

See Also


Notice

This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.

For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.

Community

Chat


Copyright

Copyright © 2016-2024. The Stdlib Authors.

streams2mobilepushbabelweaksettextflagseslinttddapollofastcopypopmotionBigInt64Arraycommand-lineArray.prototype.includesrecursivecheckframeworkoncetypesafebootstrap lesslesstsliboffsetwalkingcall-binddateshrinkwrapupmiddlewareInt32Arrayrequeststringspeedtc39getintrinsicjson-schema-validationramdacurltrimRighterrores8callboundfast-deep-clonewatchmulti-packagestartersortponyfillpropertytermtoobjectsanitizationutilityequallrumakeerror-handlingslotprefixwritableESnextArrayBuffer#slicedeepcopysafeelectronclass-validatortypedarrayStyleSheetconsumelooki18nrandomsanitizepositiverfc4122writewaitbusypatchutilfileES8espersistenttoolkitaccessorlibphonenumberserializertoArraystreamsfunctionsECMAScript 2022configurablereactmake dirfast-copyargparseinferenceArray.prototype.containsECMAScript 2021deep-cloneformsbundlingTypeBoxObject.valueseventscompilerthreeiteratejoieventDispatcherefficientenderajaxdombufferphoneinternal slotsidewordwrapECMAScript 2020ECMAScript 7Float32ArraylintcharactersencryptiongroupByoutputassertionless.jsreduxcss variablenumberrmHyBichannel[[Prototype]]circularprotoairbnbbytegetoptgestureshasOwnbatchredux-toolkitcensorcoloures-shimscryptodebugpostcss-pluginassertswatchingfindnpmfindLastIndexObservablebreakvariables in csscurriedinstallertypanionES2017linkless mixinsvalidatorrm -frdirrangeerrorutilsobjectES5.envgdprloggerassertES2020negativewarningobjinterruptszeroauthes5collection.es6RxJSpyyamlcompareRxpluginstatelesssigtermcolumnpipees2018matcheseslintconfigexites2015workspace:*limitedclassnamesiebabel-coredataviewhandlersjsdomwgetwhichinternalgroupcallbindhasconsolepasswordinspectpicomatchUint32Arraytacitfind-uphigher-orderrgbtrimEndstablegetPrototypeOfdefinesigintArrayBuffer.prototype.slicewidthpackage.jsonES2015mimetypesirqcacheyamlconstserializestyleguidewatchFileReflect.getPrototypeOflengthimmerArray.prototype.flatunicodereact poseconcatruntimepurereal-timewebqueuetester0symbolsstyleassignsignalssuperagentsuperstructES2019awesomesauceObjectbcryptquotemkdirfantasy-landUint8ArraystylesheetMaplockfilethrottleavahookformes2016astmodulesfastclonejasminestructuredCloneObject.isexecsomevalidationprogressECMAScript 6fromprettyJSON-Schemaoperating-systemintrinsicwaapiTypeScripttoStringTagObservablesESpropviewtypelinewrapfseventsregexincludesfilteropenisConcatSpreadablefetchtypescripttoSortedCSSStyleDeclarationmacosharmonyapibufferspromiseskarmawrapredactfull-width@@toStringTagarraybufferWebSocketmapiteratortestingform-validationjsonpathextratranspileshimtrimLeftfastifybrowserlistECMAScript 2018ECMAScript 2015everylogscheme-validationstatusframervalueworkerReactiveExtensionsES2021asyncECMAScript 2023fast-deep-copyremoveES7regular expressionsperformanceprotobufratecolumnsYAMLfigletduplexvaluesfsnativecommandcreateqsObject.fromEntriesFunction.prototype.namebounditerationfastauthenticationUint16Arrayclassnameestreetrimextensionargumentpnpm9fast-cloneconcurrencyES3react-testing-librarydeepwatcherjestCSSmonorepoES6collectionschemaquerystringRegExp.prototype.flagscopypackage managerpolyfillWebSocketscall-boundaccessibilityString.prototype.matchAllindicatorObject.keysstdlibnodejsshebanghttpsurlcss lessmergeimportescapeparentprocessimmutableshampruneeast-asian-width256parseidlePushes6preprocessorURLargsprivate datastringifiercorsArray.prototype.flatMapexpresstscoercibledescriptorjson-schema-validatordom-testing-librarykeysdayjsInt8ArrayvarjsxmatchAllnodeArray.prototype.findLastIndexmoveissortedcorees-abstracta11ydotenvjQuerycss nestingtrimStartquerycode pointsgetsetPrototypeOfeslint-plugininstallfunctionalmkdirsemitterminalgradients css3optionposeclonesameValueZerotoolsweakmapsequenceURLSearchParamsArraycore-jsgetOwnPropertyDescriptor$.extendansiglobparsersyntaxsearchfolderECMAScript 2019whatwghttpmetadataless compilerentriesmkdirpdeterministicuninstallbrowserreact animationmixinsdependenciesspecgradients cssslicespinnersSetprototypejwtcsscharacterpromiseio-tsformlazyObject.entriesguidminimalmime-dbemojiecmascriptgettercommanderconnectcompile lessdependency managerstringifydataViewSymbol.toStringTaglanguagedatareducerflatMapkoreanflattenyupcallbackmatchenvironmentTypedArrayflagprotocol-buffersarrayslinuxsharedarraybuffer_.extendES2016formattingreact-hooksBigUint64ArrayWeakMapregularlastdeletedeep-copydescriptionmodulebrowserslistcss-in-jschromiumtypedthroatrmdirlook-uptostringtagoptimistenumerableajvsetImmediatesymlinksdirectorywindowslesscssextendletes-shim APIvisualhashArray.prototype.filterECMAScript 5nested csshooksvestpathUnderscoresharedeventEmitterartclassesbannerdeepcloneomitIteratorutil.inspectproperties3dschemehardlinksshellrm -rfpreserve-symlinksdescriptorsnamesmimedatastructureinputspinnerbddspringjapanesexsstranspilertypedarraysratelimitsyntaxerrorjson-schemabindjavascriptReactiveXcolorseslintplugintapereuseconfigfindLastbluebirdtypeofpackageslimitflatinvariantregular expressionresolve__proto__chromecallstylesjssymlinkES2022l10nsetprivateawaitECMAScript 3asciiECMAScript 2016serializationMicrosoftcjkxhrexpressiontaskcomputed-typesInt16ArrayStreamsreadablechainopewordbreakenvtraverseES2023readablestreamhelpersrequireparentsbundlerdebuggeruuidreact-hook-formbootstrap cssrobustsetterdiffsignalfull6to5queueMicrotaskObject.getPrototypeOfutilitiesArray.prototype.flattenlistenerstimeclibyteOffsetreducesettingsperformantpackagepoint-freefile systemArray.prototype.findLastless cssnamefunctionchinesegraphqlstyled-componentsloggingcodesgenericsmochaUint8ClampedArrayformatObject.assignfixed-widthfindupregexptelephoneArrayBufferconcatMapcolorsymbolcryptObject.defineProperty-0variableses2017validatebyteLengthcontainsstylingwalkdragtappostcssdefinePropertytyped arraytestPromisejsonarrayautoprefixerdropjsonschemaRegExp#flagsequalityarktypetouchvalidtypesuser-streamszodtakeexit-codejsdiffanimationWeakSetloadingxtermES2018SymbolAsyncIterator
1.0.0

15 days ago