DIR : /home/kozerus/public_html/cropex/node/node_modules/style-to-js/src/index.ts
/home/kozerus/public_html/cropex/node/node_modules/style-to-js/src
import StyleToObject from 'style-to-object';
import { camelCase, CamelCaseOptions } from './utilities';
type StyleObject = Record<string, string>;
interface StyleToJSOptions extends CamelCaseOptions {}
/**
* Parses CSS inline style to JavaScript object (camelCased).
*/
function StyleToJS(style: string, options?: StyleToJSOptions): StyleObject {
const output: StyleObject = {};
if (!style || typeof style !== 'string') {
return output;
}
StyleToObject(style, (property, value) => {
// skip CSS comment
if (property && value) {
output[camelCase(property, options)] = value;
}
});
return output;
}
StyleToJS.default = StyleToJS;
export = StyleToJS;
//
koh5_pano
Drag mouse to navigate.
Navigation
- Left/Right Mouse drag: Changes camera heading.
- Up/Sown Mouse drag: Changes camera pitch.
- Scroll wheel: Changes camera field of view.
- I-Key: Displays Info panel with canvas size, image size and FPS.
17.Aug.2010, Martin Wengenmayer