New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

extract-i18n

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extract-i18n

Based on `grep`, extract text from project directory

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
373
-44.99%
Maintainers
1
Weekly downloads
 
Created
Source

extract-i18n

Introduction

Based on grep, extract text from project directory

Install

$ npm install --save-dev extract-i18n

or

$ yarn add -D extract-i18n

Noted

If you are using a Mac, you need to install grep

brew install grep

Usage

example/default.ts

import React from 'react';

export function App() {
  const word1 = t('Hello');
  const word2 = t(`word`);
  const word3 = t('Hello, word');
  return (
    <div>
      {word1}
      {word2}
      {word3}
    </div>
  );
}
import { extract } from 'extract-i18n';

const words = extract({
  path: 'example', // your folder/file
});

console.log(words);

//output
// ['Hello', 'word', 'Hello, word'];

FAQs

Package last updated on 24 Jun 2022

Did you know?

Socket

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.

Install

Related posts