![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@neurosity/notion
Advanced tools
This is a private (soon to be public) module published on npm. Ensure the npm user has access to the neurosity npm org before installing/publishing.
npm install @neurosity/notion
Then import the module
import { Notion } from "@neurosity/notion";
const { Notion } = require("@neurosity/notion");
<script type="module">
import { Notion } from "./node_modules/notion/esm/notion.mjs";
</script>
<script nomodule src="./node_modules/notion/browser/notion.js">
Utilizes Firebase client for data transport.
const notion = new Notion({
deviceId: "****",
apiKey: "************"
});
Options:
interface IOptions {
deviceId: string;
apiKey?: string;
metricsAllowed?: string[];
websocket: IWebsocketClient;
}
Supported clients include
Clients should be classes with the following interface.
export interface IClient {
actions: IActions;
connect(callback?: Function): Promise<any>;
disconnect(callback?: Function): Promise<any>;
getInfo(): Promise<any>;
metrics: IMetrics;
}
Skills are applications that can be written and deployed to a Notion device.
A Skill is an npm package with:
For example:
./index.js
import { createSkill } from "@neurosity/notion";
import { Drone } from "parrot-drone";
export const mySkill = createSkill((notion, context) => {
const { credentials } = context;
const drone = new Drone({
credentials
});
notion.kinesis().subscribe(kinesis => {
drone.setFlightParams(kinesis);
});
});
./package.json
{
"name": "mind-drone",
"version": "1.0.0",
"description": "Notion-powered drone control",
"dependencies": {
"@neurosity/notion": "^6.0.0",
"parrot-drone": "*"
},
"engines": {
"node": "10"
},
"private": true
}
Please use semver
$ npm version (major|minor|patch)
$ npm push origin master
$ npm publish
Requirements to run examples:
.env
file in root directoryBuilds browser examples and serves examples in the browser with ES modules.
npm run examples:browser
Go to: http://localhost:3000
npm run examples:node
deviceId
apiKey
for firebaseapiKey
from examplesFAQs
Neurosity SDK
The npm package @neurosity/notion receives a total of 41 weekly downloads. As such, @neurosity/notion popularity was classified as not popular.
We found that @neurosity/notion demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.