Registry / web-framework / cerebral-url-scheme-compiler

cerebral-url-scheme-compiler

JSON →
library0.5.3jsnpmunverified

A URL scheme compiler for the Cerebral state management framework (deprecated). Version 0.5.3 is the last release. It compiles path URLs into efficient getter and setter functions used by Cerebral actions. The package is deprecated due to Cerebral's evolution to v2+, which uses a different state access pattern. No longer maintained; alternatives include direct state access via Cerebral's props or other state libraries.

npm install cerebral-url-scheme-compiler
INSTALL
IMPORT
SIG · CEREBRAL-URL-SCHEM
C
cerebral-url-scheme-compiler
web-frameworkjavascriptv0.5.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

getCompiler
✓ import getCompiler from 'cerebral-url-scheme-compiler/get'
✗ import { getCompiler } from 'cerebral-url-scheme-compiler'
Default export from a subpath; named export from root does not exist.
setCompiler
✓ import setCompiler from 'cerebral-url-scheme-compiler/set'
✗ import { setCompiler } from 'cerebral-url-scheme-compiler'
Default export from a subpath; named export from root does not exist.
require('cerebral-url-scheme-compiler/get')
✓ const getCompiler = require('cerebral-url-scheme-compiler/get')
✗ const getCompiler = require('cerebral-url-scheme-compiler').getCompiler
CommonJS require accesses the module's exports, which is the default function; there is no .getCompiler property on the root package.

Shows how to compile a URL path into a getter function and use it with a Cerebral controller.

import getCompiler from 'cerebral-url-scheme-compiler/get'; import { Controller, Module } from 'cerebral'; const app = Module({}); const controller = Controller(app); const getValue = getCompiler('app.items.0.title'); const result = getValue({ state: controller.getState });
Debug
Known issues
deprecatedPackage is deprecated and no longer maintained. Use with Cerebral v2+ is not supported.
fix
Migrate to Cerebral v2+ which uses a different state access pattern via props or template literals.
affects: >=0.5.3
breakingThe package relies on Cerebral's internal state structure which changed significantly in v2.
fix
Do not use with Cerebral v2+; consider alternatives like direct object path access.
affects: >=0.5.0
Errors
Common errors & fixes
Cannot find module 'cerebral-url-scheme-compiler/get'
Subpath import requires Node.js >=12 or specific bundler configuration.
fix
Ensure your environment supports package exports or use a bundler that resolves subpath imports.
TypeError: getCompiler is not a function
Incorrect import: importing from root package instead of subpath.
fix
Use import getCompiler from 'cerebral-url-scheme-compiler/get' instead of from 'cerebral-url-scheme-compiler'.
Upgrade
Version history
0.5.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
OpenAI (training)
1
Resources
cerebral-url-scheme-compiler — npm install cerebral-url-scheme-compiler · libregistry