Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
preos
Advanced tools
Changelog
[1.0.2] - 2018-08-23
Readme
Preos is a js
library to transpile and interprete other languages than HTML
, CSS
and JS
in runtime.
In your project type the following command to include it in your dependencies:
npm install --save preos
const preos = require('preos');
To use this library just require it in your js
file and start using it:
const preos = require('preos');
// TypeScript to JavaScript transpiler example.
(async function () {
var result;
try {
result = await preos.transpile({
url: "path/to/file.ts",
outputLang: "js"
});
console.log(result.source);
}
catch (why) {
console.log("[ERROR]: ", why.stack);
}
})();
If you want more details take a look at the API.
preos
comes with a set of pre-configured preprocessors to use just only requiring the library:
js
]:
ts
]css
]:
html
]:
json
]:
js
]: executes itself.ts
]: transpiles the code into js
and then executes it.pug
]: returns a function
that accepts an object
with the properties to fill the template and then returns its equivalent code in html
.vue
]: returns a function that lazily will compile the template and returns an object
prepared for be use with the Vue library.json
]: returns an object
that represents its structure.xml
]: returns an object
that represents its structure. More information here.toml
]: returns an object
that represents its structure.Fixes and improvements are always welcome, so if you want to contribute helping out or warning about an error, send me an email or open an issue.
FAQs
Preos is a js library to transpile and interprete other languages than HTML, CSS and JS in runtime.
The npm package preos receives a total of 0 weekly downloads. As such, preos popularity was classified as not popular.
We found that preos demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.