{"id":26886,"library":"dataset-transpiler","title":"dataset-transpiler","description":"A JavaScript utility that transforms `.dataset.X` property access into equivalent `getAttribute('data-X')` and `setAttribute('data-X', value)` calls for backward compatibility with older browsers. Version 0.1.2 (last released Jan 2015) fixes simple setters/getters; nested `.dataset` calls remain unsupported. This package is a relic of the pre-standard `HTMLElement.dataset` era and is superseded by native browser support. It has no active maintenance and is only useful for legacy project archaeology.","status":"deprecated","version":"0.1.2","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install dataset-transpiler","lang":"bash","label":"npm"},{"cmd":"yarn add dataset-transpiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add dataset-transpiler","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package ships ESM module; CommonJS require will fail in Node or bundlers without ESM interop.","wrong":"const datasetTranspiler = require('dataset-transpiler')","symbol":"transpile","correct":"import { transpile } from 'dataset-transpiler'"},{"note":"Default export is the main transpile function; named export was removed in early documentation.","wrong":"import { transpile } from 'dataset-transpiler'","symbol":"default","correct":"import transpile from 'dataset-transpiler'"},{"note":"runtimePrefix option is case-sensitive; incorrect casing was a common bug in 0.1.1.","wrong":"transpile('element.dataset.foo', { runtimePrefix: 'myapp' })","symbol":"runtimePrefix","correct":"transpile('element.dataset.foo', { runtimePrefix: 'myApp' })"}],"quickstart":{"code":"import transpile from 'dataset-transpiler';\n\nconst input = `element.dataset.foo = 'bar';\nconst x = element.dataset.baz;`;\nconst output = transpile(input);\nconsole.log(output);\n// Output:\n// element.setAttribute('data-foo', 'bar');\n// const x = element.getAttribute('data-baz');","lang":"javascript","description":"Transpiles .dataset.X assignments and reads into setAttribute/getAttribute calls."},"warnings":[{"fix":"Manually rewrite nested accesses or avoid using them.","message":"Nested .dataset calls are not transpiled (e.g. element.dataset.foo.bar)","severity":"breaking","affected_versions":"<=0.1.2"},{"fix":"Remove dependency and use element.dataset directly for modern browsers (IE11+).","message":"Package is unmaintained since 2015; modern browsers support HTMLElement.dataset natively.","severity":"deprecated","affected_versions":"all"},{"fix":"Ensure runtimePrefix matches exactly (camelCase).","message":"runtimePrefix option fixed in 0.1.1 but still case-sensitive; wrong casing silently produces incorrect output.","severity":"gotcha","affected_versions":"0.1.0 - 0.1.2"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use ES import syntax: import x from 'dataset-transpiler'","cause":"Package uses ES module format; CommonJS require fails.","error":"Cannot find module 'dataset-transpiler'"},{"fix":"Use default import: import transpile from 'dataset-transpiler'","cause":"Attempted to use a named export that does not exist.","error":"TypeError: transpile is not a function"},{"fix":"Ensure input is a string containing valid JavaScript with .dataset usage.","cause":"The transpiler does not validate inputs; expects valid JS string.","error":"ReferenceError: element is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}