New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vuepress-plugin-reading-time2

Package Overview
Dependencies
Maintainers
1
Versions
308
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vuepress-plugin-reading-time2 - npm Package Compare versions

Comparing version 2.0.0-alpha.40 to 2.0.0-alpha.41

2

lib/node/index.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@mr-hope/vuepress-shared");const i={"/en/":{word:"About $word words",less1Minute:"Less than 1 minute",time:"About $time min"},"/zh/":{word:"约 $word 字",less1Minute:"小于 1 分钟",time:"大约 $time 分钟"},"/tw/":{word:"約 $word 字",less1Minute:"小於 1 分鐘",time:"大约 $time 分鐘"},"/de/":{word:"Um die $word Wörter",less1Minute:"Weniger als eine Minute",time:"Ungefähr $time min"},"/vi/":{word:"Khoảng $word từ",less1Minute:"Ít hơn 1 phút",time:"Khoảng $time phút"},"/uk/":{word:"Про $word слова",less1Minute:"Менше 1 хвилини",time:"Приблизно $time хв"},"/ru/":{word:"Про $word слова",less1Minute:"Меньше 1 минуты",time:"Приблизительно $time минут"},"/br/":{word:"Por volta de $word palavras",less1Minute:"Menos de 1 minuto",time:"Por volta de $time min"}},t=e=>e.match(/[\w\d\s,.\u00C0-\u024F]+/giu)||[],r=e=>e.match(/[\u4E00-\u9FD5]/gu)||[],n=e=>t(e).reduce(((e,i)=>e+(""===i.trim()?0:i.trim().split(/\s+/u).length)),0)+r(e).length,s=(e,i=300)=>{const t=n(e||"");return{minutes:Math.round(t/i*100)/100,words:t}},o=(t,r)=>({name:"vuepress-plugin-reading-time2",define:()=>({READING_TIME_LOCALES:e.getLocales(r,i,t.locales)}),extendsPage:e=>{e.data.readingTime=s(e.content,t.wordPerMinute||300)}});exports.default=o,exports.getChinese=r,exports.getReadingTime=s,exports.getWordNumber=n,exports.getWords=t,exports.readingTime=e=>["reading-time2",e],exports.readingTimePlugin=o,exports.removeReadingTimePlugin=e=>{const i=e.pluginApi.plugins.findIndex((e=>"vuepress-plugin-reading-time2"===e.name));-1!==i&&e.pluginApi.plugins.splice(i,1)},exports.useReadingTimePlugin=(e,i)=>{e.pluginApi.plugins.every((e=>"vuepress-plugin-reading-time2"!==e.name))&&e.use(o,i)};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@mr-hope/vuepress-shared");const i={"/en/":{word:"About $word words",less1Minute:"Less than 1 minute",time:"About $time min"},"/zh/":{word:"约 $word 字",less1Minute:"小于 1 分钟",time:"大约 $time 分钟"},"/tw/":{word:"約 $word 字",less1Minute:"小於 1 分鐘",time:"大约 $time 分鐘"},"/de/":{word:"Um die $word Wörter",less1Minute:"Weniger als eine Minute",time:"Ungefähr $time min"},"/vi/":{word:"Khoảng $word từ",less1Minute:"Ít hơn 1 phút",time:"Khoảng $time phút"},"/uk/":{word:"Про $word слова",less1Minute:"Менше 1 хвилини",time:"Приблизно $time хв"},"/ru/":{word:"Про $word слова",less1Minute:"Меньше 1 минуты",time:"Приблизительно $time минут"},"/br/":{word:"Por volta de $word palavras",less1Minute:"Menos de 1 minuto",time:"Por volta de $time min"}},t=e=>e.match(/[\w\d\s,.\u00C0-\u024F]+/giu)||[],r=e=>e.match(/[\u4E00-\u9FD5]/gu)||[],n=e=>t(e).reduce(((e,i)=>e+(""===i.trim()?0:i.trim().split(/\s+/u).length)),0)+r(e).length,s=(e,i=300)=>{const t=n(e||"");return{minutes:Math.round(t/i*100)/100,words:t}},o=t=>({name:"vuepress-plugin-reading-time2",define:r=>({READING_TIME_LOCALES:e.getLocales(r,i,t.locales)}),extendsPage:e=>{e.data.readingTime=s(e.content,t.wordPerMinute||300)}});exports.default=o,exports.getChinese=r,exports.getReadingTime=s,exports.getWordNumber=n,exports.getWords=t,exports.readingTime=e=>["reading-time2",e],exports.readingTimePlugin=o,exports.removeReadingTimePlugin=e=>{const i=e.pluginApi.plugins.findIndex((e=>"vuepress-plugin-reading-time2"===e.name));-1!==i&&e.pluginApi.plugins.splice(i,1)},exports.useReadingTimePlugin=(e,i)=>{e.pluginApi.plugins.every((e=>"vuepress-plugin-reading-time2"!==e.name))&&e.use(o,i)};
//# sourceMappingURL=index.js.map
{
"name": "vuepress-plugin-reading-time2",
"version": "2.0.0-alpha.40",
"version": "2.0.0-alpha.41",
"description": "Reading time plugin for VuePress",

@@ -38,3 +38,3 @@ "keywords": [

"dependencies": {
"@mr-hope/vuepress-shared": "2.0.0-alpha.40"
"@mr-hope/vuepress-shared": "2.0.0-alpha.41"
},

@@ -47,3 +47,3 @@ "devDependencies": {

},
"gitHead": "ba90ad2e3f3239f97f0402bc6f5530b248ff0bd3"
"gitHead": "9c0e35cc2d33443a1e772d4ca534ad838abb89a6"
}

@@ -9,7 +9,7 @@ import { getLocales } from "@mr-hope/vuepress-shared";

/** Reading time plugin */
export const readingTimePlugin: Plugin<ReadingTimeOptions> = (options, app) => {
export const readingTimePlugin: Plugin<ReadingTimeOptions> = (options) => {
return {
name: "vuepress-plugin-reading-time2",
define: (): Record<string, unknown> => ({
define: (app): Record<string, unknown> => ({
READING_TIME_LOCALES: getLocales(

@@ -16,0 +16,0 @@ app,

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