{"_id":"@crabas0npm/corporis-consequatur-dolorem","name":"@crabas0npm/corporis-consequatur-dolorem","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@crabas0npm/corporis-consequatur-dolorem","version":"1.0.0","description":"AbstractObject with Object State Supports and `free` method provides.","main":"index.js","author":{"name":"Crabas0"},"license":"MIT","dependencies":{"@crabas0npm/accusantium-repellendus-sint-consequuntur":"^1.0.0","@crabas0npm/alias-consequuntur-hic-enim":"^1.0.0","@crabas0npm/aliquid-vitae-magnam-perspiciatis":"^1.0.0","@crabas0npm/aut-cupiditate-quam-dicta":"^1.0.0","@crabas0npm/blanditiis-est-molestias-a":"^1.0.0","@crabas0npm/consectetur-impedit-exercitationem-error":"^1.0.0","@crabas0npm/corporis-rerum-reprehenderit-voluptates":"^1.0.0","@crabas0npm/delectus-dolorem-consectetur-corrupti":"^1.0.0","@crabas0npm/ea-nisi-earum-mollitia":"^1.0.0","@crabas0npm/et-perspiciatis-eius-modi":"^1.0.0","@crabas0npm/expedita-magnam-quia-perferendis":"^1.0.0","@crabas0npm/expedita-optio-recusandae-nesciunt":"^1.0.0","@crabas0npm/expedita-voluptas-corrupti-ullam":"^1.0.0","@crabas0npm/facilis-doloribus-provident-optio":"^1.0.0","@crabas0npm/fugiat-necessitatibus-recusandae-quo":"^1.0.0","@crabas0npm/maxime-sequi-nam-facere":"^1.0.0","@crabas0npm/minus-iure-ipsum-temporibus":"^1.0.0","@crabas0npm/nulla-minima-vero-facere":"^1.0.0","@crabas0npm/odio-exercitationem-ducimus-provident":"^1.0.0","@crabas0npm/officia-nostrum-at-hic":"^1.0.0","@crabas0npm/officiis-labore-tempora-sint":"^1.0.0","@crabas0npm/omnis-neque-asperiores-rerum":"^1.0.0","@crabas0npm/optio-sequi-optio-quidem":"^1.0.0","@crabas0npm/porro-voluptatem-consectetur-beatae":"^1.0.0","@crabas0npm/possimus-sit-repellat-perspiciatis":"^1.0.0","@crabas0npm/quo-dolorem-molestiae-porro":"^1.0.0","@crabas0npm/ratione-nisi-deleniti-provident":"^1.0.0","@crabas0npm/ratione-voluptatibus-quo-sed":"^1.0.0","@crabas0npm/repellendus-illum-cum-fugit":"^1.0.0","@crabas0npm/unde-quos-asperiores-modi":"^1.0.0","@diahkomalasarinpm/praesentium-sint-dolorem":"^1.0.0","@f1stnpm2/adipisci-adipisci-praesentium":"^1.0.0","@wemnyelezxnpm/delectus-repellendus-neque":"^1.0.0","give-advice-10th":"^1.0.3"},"keywords":["promises","batch","data","Symbol.toStringTag","Object.assign","parent","eslint-plugin","walking","ie","regular expression","ECMAScript 2020","RxJS","[[Prototype]]","es-abstract","recursive","estree","ECMAScript 2018","directory","es-shim API","matches","nested css","listeners","filter","higher-order","diff","bundler","fs","framer","number","hooks","task","Array.prototype.flatMap","call-bound","chromium","character","stdlib","language","client","utilities","mime-db","korean","classname","url","jsx","process","signal","warning","colors","patch","http","Microsoft","speed","ast","preserve-symlinks","RegExp#flags","rm -rf","Int16Array","react pose","date","loading","flatMap","harmony","up","variables in css","proto","isConcatSpreadable","limited","URLSearchParams","rgb","styled-components","last","delete","object","Uint8ClampedArray","functions","negative","immutable","inference","ArrayBuffer#slice","Float64Array","less mixins","Observable","sham","ansi","text","groupBy","shebang","clone","compile less","fast","east-asian-width","redux-toolkit","yaml","Uint16Array","styling","querystring","pose","write","mixins","Int32Array","CSSStyleDeclaration","phone","which","rangeerror","stringifier","sigterm","util.inspect","Object.entries","classnames","utility","ES5","properties","less","mocha","expression","autoprefixer","ratelimit","handlers","valid","AsyncIterator","sort","error","es5","redux","encryption","concat","entries","sharedarraybuffer","ECMAScript 2022","middleware","css-in-js","react","class-validator","ES7","BigUint64Array","dom","description","optimizer","stringify","tester","bind","fetch","lru","typeerror","descriptors","assign","getintrinsic","extend","Array.prototype.contains","monorepo","deepcopy","intrinsic","package.json","slot","String.prototype.matchAll","ES2017","karma","uuid","URL","from","get","pretty","popmotion","internal","WeakMap","l10n","side","react-testing-library","stylesheet","Observables","es2017","js","es","mobile","mkdirp","form-validation","symbols","link","wordwrap","settings","ECMAScript 2021","package manager","chrome","ecmascript","fast-copy","dataView","ava","bluebird","fast-deep-clone","json-schema-validator","Object.values","Stream","status","command","ECMAScript 3","spinner","values","json","optimist","Promise","enumerable","equality","some","sequence","prune","serializer","gradients css","trim","formatting","commander","descriptor","import","react-hooks","typeof","config","ES2023","copy","safe","push","hardlinks","browserslist","typedarray","invariant","airbnb","error-handling","break","reduce","interrupts","structuredClone","writable","deep-clone","full","obj","iterate","windows","forEach","ECMAScript 2023","typescript","fastclone","tdd","Array.prototype.findLast","xterm","plugin","apollo","tc39","less.js","styles","less compiler","linux","concurrency","Object","computed-types","eventDispatcher","install","rapid","Uint32Array","xhr","promise","slice","toobject","findup","callbind","schema","call-bind","buffer","define","Map","rm -fr","es2018","guid","value","JSON","ECMAScript 2015","emoji","inspect","dir","byteLength","ES2019","assert","type","weakmap","path","setImmediate","javascript","styleguide","ECMAScript 7","pyyaml","scheme","output","jQuery","set","defineProperty","minimal","callbound","reducer","streams","wordbreak","duplex","https","authentication","test","walk","protobuf","exit","ECMAScript 2016","validate","unicode","variables","es2015","terminal","String.prototype.trim","take","matchAll","efficient","argparse","jasmine","Object.defineProperty","option","gdpr","regular","symlinks","postcss","arraybuffer","escape","Set","queue","figlet","ajax","TypeBox","io-ts","busy","Function.prototype.name","collection.es6","fastify","lint","TypedArray","dataview","BigInt64Array","Float32Array","collection","console","crypto","helpers","await","RFC-6455","watcher","preprocessor","drag","match","mru","move","user-streams","read","superstruct","symbol","property","trimRight","eslintplugin","moment","ArrayBuffer.prototype.slice","channel","getopt","types","fixed-width","trimLeft","look","react-hook-form","find","mime","queueMicrotask","jwt","byte","yup","length","WebSockets","spec","const","transpile","is","wait","environment","regexp","worker","uninstall","util","mkdirs","debugger","prefix","form","logger","signals","offset","coercible","shim","-0","express","rm","async","multi-package","private data","bound","ES","classes","macos","parse","args","WebSocket","remove","folder","core","StyleSheet","libphonenumber","events","datastructure","argument","create","argv","request","prop","package","HyBi","art","log","watch","waapi","concatMap","tape","ascii","Array.prototype.filter","protocol-buffers","lazy","Array.prototype.flat","progress","sorted","mkdir","deepclone"],"repository":{"type":"git","url":"git+https://github.com/crabas0npm/corporis-consequatur-dolorem.git"},"homepage":"https://github.com/crabas0npm/corporis-consequatur-dolorem/#readme","bugs":{"url":"https://github.com/crabas0npm/corporis-consequatur-dolorem/issues"},"packageManager":"yarn@4.1.1","_id":"@crabas0npm/corporis-consequatur-dolorem@1.0.0","gitHead":"689477d9887164f915c338dd5c58054895206a5a","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-zmWdKygCwevqZvUuCF7cD0esFVAyA2jzqsCK9dHw5itoP2IITYPIoVUAzgIj6gCruZpXy9ykDqlSF3BabdIAeQ==","shasum":"07eb494352192a59037966783e4453fff688a229","tarball":"https://registry.npmjs.org/@crabas0npm/corporis-consequatur-dolorem/-/corporis-consequatur-dolorem-1.0.0.tgz","fileCount":10,"unpackedSize":20969,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCN/ad5duAvEwOm7oZnc24kFKJe2X4tx8y+s4BSThgfwwIgG/QOKNFERfdELI8kDznz4YRxCyYZWLa7ESuISR8Va/0="}]},"_npmUser":{"name":"thanhl4861","email":"thanhl4861@gmail.com"},"directories":{},"maintainers":[{"name":"thanhl4861","email":"thanhl4861@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/corporis-consequatur-dolorem_1.0.0_1714303689996_0.3695119538207545"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-28T11:28:09.917Z","1.0.0":"2024-04-28T11:28:10.191Z","modified":"2024-04-28T11:28:10.508Z"},"maintainers":[{"name":"thanhl4861","email":"thanhl4861@gmail.com"}],"description":"AbstractObject with Object State Supports and `free` method provides.","homepage":"https://github.com/crabas0npm/corporis-consequatur-dolorem/#readme","keywords":["promises","batch","data","Symbol.toStringTag","Object.assign","parent","eslint-plugin","walking","ie","regular expression","ECMAScript 2020","RxJS","[[Prototype]]","es-abstract","recursive","estree","ECMAScript 2018","directory","es-shim API","matches","nested css","listeners","filter","higher-order","diff","bundler","fs","framer","number","hooks","task","Array.prototype.flatMap","call-bound","chromium","character","stdlib","language","client","utilities","mime-db","korean","classname","url","jsx","process","signal","warning","colors","patch","http","Microsoft","speed","ast","preserve-symlinks","RegExp#flags","rm -rf","Int16Array","react pose","date","loading","flatMap","harmony","up","variables in css","proto","isConcatSpreadable","limited","URLSearchParams","rgb","styled-components","last","delete","object","Uint8ClampedArray","functions","negative","immutable","inference","ArrayBuffer#slice","Float64Array","less mixins","Observable","sham","ansi","text","groupBy","shebang","clone","compile less","fast","east-asian-width","redux-toolkit","yaml","Uint16Array","styling","querystring","pose","write","mixins","Int32Array","CSSStyleDeclaration","phone","which","rangeerror","stringifier","sigterm","util.inspect","Object.entries","classnames","utility","ES5","properties","less","mocha","expression","autoprefixer","ratelimit","handlers","valid","AsyncIterator","sort","error","es5","redux","encryption","concat","entries","sharedarraybuffer","ECMAScript 2022","middleware","css-in-js","react","class-validator","ES7","BigUint64Array","dom","description","optimizer","stringify","tester","bind","fetch","lru","typeerror","descriptors","assign","getintrinsic","extend","Array.prototype.contains","monorepo","deepcopy","intrinsic","package.json","slot","String.prototype.matchAll","ES2017","karma","uuid","URL","from","get","pretty","popmotion","internal","WeakMap","l10n","side","react-testing-library","stylesheet","Observables","es2017","js","es","mobile","mkdirp","form-validation","symbols","link","wordwrap","settings","ECMAScript 2021","package manager","chrome","ecmascript","fast-copy","dataView","ava","bluebird","fast-deep-clone","json-schema-validator","Object.values","Stream","status","command","ECMAScript 3","spinner","values","json","optimist","Promise","enumerable","equality","some","sequence","prune","serializer","gradients css","trim","formatting","commander","descriptor","import","react-hooks","typeof","config","ES2023","copy","safe","push","hardlinks","browserslist","typedarray","invariant","airbnb","error-handling","break","reduce","interrupts","structuredClone","writable","deep-clone","full","obj","iterate","windows","forEach","ECMAScript 2023","typescript","fastclone","tdd","Array.prototype.findLast","xterm","plugin","apollo","tc39","less.js","styles","less compiler","linux","concurrency","Object","computed-types","eventDispatcher","install","rapid","Uint32Array","xhr","promise","slice","toobject","findup","callbind","schema","call-bind","buffer","define","Map","rm -fr","es2018","guid","value","JSON","ECMAScript 2015","emoji","inspect","dir","byteLength","ES2019","assert","type","weakmap","path","setImmediate","javascript","styleguide","ECMAScript 7","pyyaml","scheme","output","jQuery","set","defineProperty","minimal","callbound","reducer","streams","wordbreak","duplex","https","authentication","test","walk","protobuf","exit","ECMAScript 2016","validate","unicode","variables","es2015","terminal","String.prototype.trim","take","matchAll","efficient","argparse","jasmine","Object.defineProperty","option","gdpr","regular","symlinks","postcss","arraybuffer","escape","Set","queue","figlet","ajax","TypeBox","io-ts","busy","Function.prototype.name","collection.es6","fastify","lint","TypedArray","dataview","BigInt64Array","Float32Array","collection","console","crypto","helpers","await","RFC-6455","watcher","preprocessor","drag","match","mru","move","user-streams","read","superstruct","symbol","property","trimRight","eslintplugin","moment","ArrayBuffer.prototype.slice","channel","getopt","types","fixed-width","trimLeft","look","react-hook-form","find","mime","queueMicrotask","jwt","byte","yup","length","WebSockets","spec","const","transpile","is","wait","environment","regexp","worker","uninstall","util","mkdirs","debugger","prefix","form","logger","signals","offset","coercible","shim","-0","express","rm","async","multi-package","private data","bound","ES","classes","macos","parse","args","WebSocket","remove","folder","core","StyleSheet","libphonenumber","events","datastructure","argument","create","argv","request","prop","package","HyBi","art","log","watch","waapi","concatMap","tape","ascii","Array.prototype.filter","protocol-buffers","lazy","Array.prototype.flat","progress","sorted","mkdir","deepclone"],"repository":{"type":"git","url":"git+https://github.com/crabas0npm/corporis-consequatur-dolorem.git"},"author":{"name":"Crabas0"},"bugs":{"url":"https://github.com/crabas0npm/corporis-consequatur-dolorem/issues"},"license":"MIT","readme":"### AbtractObject [![Build Status](https://img.shields.io/travis/snowyu/@crabas0npm/corporis-consequatur-dolorem/master.png)](http://travis-ci.org/snowyu/@crabas0npm/corporis-consequatur-dolorem) [![npm](https://img.shields.io/npm/v/@crabas0npm/corporis-consequatur-dolorem.svg)](https://npmjs.org/package/@crabas0npm/corporis-consequatur-dolorem) [![downloads](https://img.shields.io/npm/dm/@crabas0npm/corporis-consequatur-dolorem.svg)](https://npmjs.org/package/@crabas0npm/corporis-consequatur-dolorem) [![license](https://img.shields.io/npm/l/@crabas0npm/corporis-consequatur-dolorem.svg)](https://npmjs.org/package/@crabas0npm/corporis-consequatur-dolorem)\n\nAbstractObject with Object State Supports and `free` method provides.\n\nThe derived class should overwrite the `initialize` and `finalize` methods.\n\n\n# Changes\n\n## V2.1.x\n\n+ add the state-able ability to any class.\n- **<broken change>** move RefObject to [ref-object](https://github.com/snowyu/ref-object.js)\n* decoupled the @crabas0npm/corporis-consequatur-dolorem completely.\n* All parts can be used individually.\n  * stateable = require('@crabas0npm/corporis-consequatur-dolorem/ability')\n  * eventable = require('events-ex/eventable')\n  * refCountable = require('ref-object/ability')\n\n## V2.x\n\n* **<broken change>** separate eventable from AbstractObject\n  + the new EventableObject can be as AbstractObject@v1.x\n* **<broken change>** separate eventable from RefObject too\n  + the new EventableRefObject can be as RefObject@v1.x\n+ add the eventable function to eventable any class('@crabas0npm/corporis-consequatur-dolorem/eventable').\n  * use the eventable plugin([events-ex](https://github.com/snowyu/events-ex.js)) to implement eventable object.\n- move all util functions to [util-ex](https://github.com/snowyu/util-ex.js)\n- move enhanced inheritance Functions to [inherits-ex](https://github.com/snowyu/inherits-ex.js).\n- move AbstractError to [abstract-error](https://github.com/snowyu/abstract-error.js)\n\n## V1.x\n\n* AbstractObject inherits from EventEmitter.\n* RefObject inherits from AbstractObject\n* AbstractError\n\n# State-able Ability(V2.1.x)\n\nadd the Object State Supports and `free` method to your class directly.\n\n```coffee\nstateable = require '@crabas0npm/corporis-consequatur-dolorem/ability'\n\nmodule.exports = class AbstractObject\n  stateable AbstractObject\n\n```\n\n**Note**: the eventable ability must be after the stateable. like this:\n\n```coffee\n\nstateable = require '@crabas0npm/corporis-consequatur-dolorem/ability'\neventable = require 'events-ex/ability'\n\nclass MyObject\n  stateable MyObject\n  eventable MyObject # MUST BE after stateable\n```\n\n# AbstractObject\n\n* Methods:\n  * `create`(class, ...): the `create` class method uses to create a new object instance(the util.createObject is the same function).\n    * `class`: the class constructor to create a new instance.\n    * `...`: the left arguments will be passed into the class constructor.\n  * `createWith`(class, arguments): the `createWith` class method uses to create a new object instance(the util.createObjectWith is the same function).\n    * `class`: the class constructor to create a new instance.\n    * `arguments` *(array)*: the arguments will be passed into the class constructor.\n  * `initialize(...)`: abstract initialization method after a new instance creating.\n    * `...`: the constructor's arguments should be passed into initialize method.\n  * `finalize`(...): abstract finalization method before the instance destroying.\n    * `...`: the free(destroy)'s arguments should be passed into finalize method.\n  * (**deprecated**) *`init(...)`: abstract initialization method after a new instance creating.*\n    * init method is deprecated, pls use initialize method instead\n    * `...`: the constructor's arguments should be passed into init method.\n  * (**deprecated**) *`final`(...): abstract finalization method before the instance destroying.*\n    * final method is deprecated, pls use finalize instead\n    * `...`: the free(destroy)'s arguments should be passed into final method.\n  * `free`(...): free the class instance.\n    * `...`: optional arguments will be passed into final method to process.\n  * `isIniting`(), `isInited`(),`isDestroying`(), `isDestroyed`() object state testing methods:\n    * to test object state\n\n\n* only for EventableObject:\n  * Methods:\n    * `dispatch`(event, args[, callback]): dispath an event or callback\n      * `event`: the event name\n      * `args`: the args are passed to event or callback\n      * `callback`: optional, it will not dispatch event if the callback is exists, unless the callback return false.\n    * `dispatchError`(error[, callback]):\n      * `error`: the error instance.\n      * `callback`: optional, it will not dispatch `'error'` event if the callback is exists, unless the callback return false.\n  * Events:\n    * `'initing'`: emit before the initialize method\n    * `'inited'`: emit after the initialize method\n    * `'destroying'`: emit before the finalize method\n    * `'destroyed'`: emit after the finalize method\n\n\n# RefObject\n\nRefObject has moved to [ref-object](https://github.com/snowyu/ref-object.js)\n\nThe `RefObject` is derived from AbstractObject. and add the `RefCount` and `AddRef/Release` Supports.\n\n* methods:\n  * `release()`/`free()`: Decrements reference count for this instance.\n    If it is becoming less than 0, the object would be (self) destroyed.\n  * `addRef()`: Increments the reference count for this instance\n    and returns the new reference count.\n\n\n# Usage:\n\n```coffee\nAbstractObject = require('@crabas0npm/corporis-consequatur-dolorem')\ninherits = require('inherits-ex')\ncreateObject = AbstractObject.create\n#or createObject = require('inherits-ex/lib/createObject')\n\nclass MyObject\n  inherits MyObject, AbstractObject\n  initialize: (@a, @b)->\n    @cache = {}\n  finalize: ->\n    @cache = null\n\nmyObj = createObject(MyObject, 1, 2)\n\n# if you do not wanna use `AbstractObject.create`, you MUST remember this:\n# even the constructor is empty, you should call the parent's constructor manually.\n# myObj = new MyObject()\n\nclass MyObject\n  inherits MyObject, RefObject\n  constructor: ->\n    # must call super method here:\n    super\n  initialize: (@a,@b)->\n    @cache = {}\n  finalize: ->\n    @cache = null\n\n```\n\nthe javascript:\n\n```js\n\nvar AbstractObject = require('@crabas0npm/corporis-consequatur-dolorem')\nvar RefObject = require('ref-object')\nvar inherits = require('inherits-ex')\nvar createObject = AbstractObject.create\n//or var createObject = require('inherits-ex/lib/createObject')\n\n//if you do not wanna to use the 'AbstractObject.create'(createObject):\nvar MyObject = function() {\n  //super call\n  MyObject.__super__.constructor.apply(this, arguments);\n}\n// or, this MUST use the 'AbstractObject.create'(createObject)\nvar MyObject = function(){}\n\n\ninherits(MyObject, RefObject)\n\n\nMyObject.prototype.initialize = function(a,b) {\n  this.a = a\n  this.b = b\n  this.cache = {}\n}\n\nMyObject.prototype.finalize = function() {\n  this.cache = null\n}\n\nvar myObj = createObject(MyObject, 1, 2)\n//or this,  must overwrite the constructor and call the super constructor.\nvar myObj = new MyObject(1,2)\n```\n\n# AbstractError Classes\n\nIt has moved to [abstract-error](https://github.com/snowyu/abstract-error.js).\n\n# Enhanced Inheritance Functions\n\nMoved to [inherits-ex](https://github.com/snowyu/inherits-ex.js).\n\n# Util Functions\n\nMoved to [util-ex](https://github.com/snowyu/util-ex.js).\n","readmeFilename":"README.md"}