Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

notion-utils

Package Overview
Dependencies
Maintainers
0
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

notion-utils - npm Package Compare versions

Comparing version 7.1.1 to 7.1.2

7

build/index.d.ts

@@ -143,2 +143,7 @@ import * as types from 'notion-types';

/**
* Gets the IDs of all tweets embedded on a page.
*/
declare const getPageTweets: (recordMap: types.ExtendedRecordMap) => string[];
/**
* Gets the raw, unformatted text content of a block's content value.

@@ -174,2 +179,2 @@ *

export { type NotionDateTime, type TableOfContentsEntry, defaultMapImageUrl, defaultMapPageUrl, estimatePageReadTime, estimatePageReadTimeAsHumanizedString, formatDate, formatNotionDateTime, getAllPagesInSpace, getBlockCollectionId, getBlockIcon, getBlockParentPage, getBlockTitle, getCanonicalPageId, getDateValue, getPageBreadcrumbs, getPageContentBlockIds, getPageImageUrls, getPageProperty, getPageTableOfContents, getPageTitle, getTextContent, idToUuid, mergeRecordMaps, normalizeTitle, normalizeUrl, parsePageId, uuidToId };
export { type NotionDateTime, type TableOfContentsEntry, defaultMapImageUrl, defaultMapPageUrl, estimatePageReadTime, estimatePageReadTimeAsHumanizedString, formatDate, formatNotionDateTime, getAllPagesInSpace, getBlockCollectionId, getBlockIcon, getBlockParentPage, getBlockTitle, getCanonicalPageId, getDateValue, getPageBreadcrumbs, getPageContentBlockIds, getPageImageUrls, getPageProperty, getPageTableOfContents, getPageTitle, getPageTweets, getTextContent, idToUuid, mergeRecordMaps, normalizeTitle, normalizeUrl, parsePageId, uuidToId };

@@ -717,2 +717,18 @@ // src/estimate-page-read-time.ts

// src/get-page-tweets.ts
var getPageTweets = (recordMap) => {
const blockIds = Object.keys(recordMap.block);
const tweetIds = blockIds.map((blockId) => {
var _a, _b, _c, _d;
const block = (_a = recordMap.block[blockId]) == null ? void 0 : _a.value;
if ((block == null ? void 0 : block.type) === "tweet") {
const tweetId = (_d = (_c = (_b = block.properties) == null ? void 0 : _b.source) == null ? void 0 : _c[0]) == null ? void 0 : _d[0];
if (tweetId) {
return tweetId;
}
}
}).filter(Boolean);
return Array.from(new Set(tweetIds));
};
// src/map-image-url.ts

@@ -847,2 +863,3 @@ import "notion-types";

getPageTitle,
getPageTweets,
getTextContent,

@@ -849,0 +866,0 @@ idToUuid,

4

package.json
{
"name": "notion-utils",
"version": "7.1.1",
"version": "7.1.2",
"type": "module",

@@ -30,3 +30,3 @@ "description": "Useful utilities for working with Notion data. Isomorphic.",

"p-queue": "^8.0.1",
"notion-types": "7.1.1"
"notion-types": "7.1.2"
},

@@ -33,0 +33,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc