Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
fenris-date-tool
Advanced tools
Date utility to make dates suck less when they aren't saved in UTC
Date tool to convert to and from Locale times to UTC
Currently only works with Danish time.
import { FDTLocaleToUtc } from 'fenris-date-tool';
export const example = (inputDate: string): string => {
const utcDateString: string = FDTLocaleToUtc(item.DateTime, 'Europe/Copenhagen');
return utcDateString
};
npm run clean
npm run build
npm run build:types
npm publish
This is created and maintained with with rollup, typedocs (in theory), @microsoft/api-extractor
This is created and maintained with with rollup, typedocs (in theory), @microsoft/api-extractor
start:
npm install --save-dev \
eslint \
typescript \
tslib \
ts-node \
rollup \
@rollup/plugin-commonjs \
@rollup/plugin-node-resolve \
@rollup/plugin-typescript
npm install @microsoft/api-extractor
The scripts setup should look like:
"scripts": {
"dev": "rollup -c -w",
"build": "rollup -c --bundleConfigAsCjs",
"prebuild:types": "rimraf ./build",
"build:types": "tsc -p ./tsconfig.json --outDir build --declaration true && api-extractor run",
"predocs": "rimraf ./docs",
"docs": "typedoc src --out docs",
"clean": "rimraf ./build ./dist ./docs",
"test": "echo \"Error: no test specified\" && exit 1"
},
The rollup config should looklike
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from "@rollup/plugin-commonjs";
import typescript from "@rollup/plugin-typescript";
import pkg from "./package.json";
export default [
{
input: "src/index.ts",
output: [
{ file: pkg.main, format: "cjs" },
{ file: pkg.module, format: "es" },
],
plugins: [
commonjs(),
nodeResolve(),
typescript({ tsconfig: "./tsconfig.json" })],
},
];
The TSconfig should look like:
{
"compilerOptions": {
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"esModuleInterop": true,
"target": "es6",
"module": "esnext",
"moduleResolution": "node",
"strict": true
}
}
FAQs
Date utility to make dates suck less when they aren't saved in UTC
We found that fenris-date-tool 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.
Security News
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.